multi_level_nesting_test.rb 651 B

1234567891011121314151617181920
  1. #!/usr/bin/ruby
  2. # multi_level_nesting_test_pb.rb is in the same directory as this test.
  3. $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
  4. require 'test/unit'
  5. require 'multi_level_nesting_test_pb'
  6. #
  7. # Provide tests for having messages nested 3 levels deep
  8. #
  9. class MultiLevelNestingTest < Test::Unit::TestCase
  10. def test_levels_exist
  11. assert ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Function").msgclass
  12. assert ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Function.Parameter").msgclass
  13. assert ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Function.Parameter.Value").msgclass
  14. end
  15. end