Sha256: c4bbceff201434017739b40b055a19f7856257e271207fad258390f2bfb6f0bf

Contents?: true

Size: 762 Bytes

Versions: 24

Compression:

Stored size: 762 Bytes

Contents

activity Java::org.ruboto.test_app.ViewConstantsActivity
java_import 'android.view.ViewGroup'
java_import 'android.view.Gravity'
java_import 'android.os.Build'

setup do |activity|
  start = Time.now
  loop do
    @text_view = activity.findViewById(42)
    break if @text_view || (Time.now - start > 60)
    sleep 1
  end
  assert @text_view
end

def view_constant(const)
  View.convert_constant(const.downcase.to_sym)
end

test('LayoutParams Constants') do |activity|
  ViewGroup::LayoutParams.constants.each do |const|
    assert_equal ViewGroup::LayoutParams.const_get(const), view_constant(const)
  end
end

test('Gravity Constants') do |activity|
  Gravity.constants.each do |const|
    assert_equal Gravity.const_get(const), view_constant(const)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ruboto-1.6.1 test/activity/view_constants_activity_test.rb
ruboto-1.6.0 test/activity/view_constants_activity_test.rb
ruboto-1.5.0 test/activity/view_constants_activity_test.rb
ruboto-1.4.1 test/activity/view_constants_activity_test.rb
ruboto-1.4.0 test/activity/view_constants_activity_test.rb
ruboto-1.3.1 test/activity/view_constants_activity_test.rb
ruboto-1.3.0 test/activity/view_constants_activity_test.rb
ruboto-1.2.0 test/activity/view_constants_activity_test.rb
ruboto-1.1.2 test/activity/view_constants_activity_test.rb
ruboto-1.1.1 test/activity/view_constants_activity_test.rb
ruboto-1.1.0 test/activity/view_constants_activity_test.rb
ruboto-1.0.3 test/activity/view_constants_activity_test.rb
ruboto-1.0.2 test/activity/view_constants_activity_test.rb
ruboto-1.0.1 test/activity/view_constants_activity_test.rb
ruboto-1.0.0 test/activity/view_constants_activity_test.rb
ruboto-0.16.0 test/activity/view_constants_activity_test.rb
ruboto-0.15.0 test/activity/view_constants_activity_test.rb
ruboto-0.14.0 test/activity/view_constants_activity_test.rb
ruboto-0.13.0 test/activity/view_constants_activity_test.rb
ruboto-0.12.0 test/activity/view_constants_activity_test.rb