1ffe3c632Sopenharmony_ci#!/usr/bin/ruby
2ffe3c632Sopenharmony_ci
3ffe3c632Sopenharmony_ci# generated_code.rb is in the same directory as this test.
4ffe3c632Sopenharmony_ci$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
5ffe3c632Sopenharmony_ci
6ffe3c632Sopenharmony_cirequire 'generated_code_pb'
7ffe3c632Sopenharmony_cirequire 'test_import_pb'
8ffe3c632Sopenharmony_cirequire 'test_ruby_package_pb'
9ffe3c632Sopenharmony_cirequire 'test/unit'
10ffe3c632Sopenharmony_ci
11ffe3c632Sopenharmony_ciclass GeneratedCodeTest < Test::Unit::TestCase
12ffe3c632Sopenharmony_ci  def test_generated_msg
13ffe3c632Sopenharmony_ci    # just test that we can instantiate the message. The purpose of this test
14ffe3c632Sopenharmony_ci    # is to ensure that the output of the code generator is valid Ruby and
15ffe3c632Sopenharmony_ci    # successfully creates message definitions and classes, not to test every
16ffe3c632Sopenharmony_ci    # aspect of the extension (basic.rb is for that).
17ffe3c632Sopenharmony_ci    A::B::C::TestMessage.new
18ffe3c632Sopenharmony_ci    A::B::C::TestMessage::NestedMessage.new
19ffe3c632Sopenharmony_ci    A::B::C::TestLowercaseNested::Lowercase.new
20ffe3c632Sopenharmony_ci    FooBar::TestImportedMessage.new
21ffe3c632Sopenharmony_ci    A::B::TestRubyPackageMessage.new
22ffe3c632Sopenharmony_ci  end
23ffe3c632Sopenharmony_ciend
24