Skip to content

Commit

Permalink
Make the new multi-level ruby tests fit the existing structure better…
Browse files Browse the repository at this point in the history
… and add them to the makefile
  • Loading branch information
Rob Widmer authored and acozzette committed Jan 14, 2021
1 parent 1d39f78 commit 48234f5
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -192,6 +192,7 @@ ruby/tests/generated_code_pb.rb
ruby/tests/test_import_pb.rb
ruby/tests/test_ruby_package_pb.rb
ruby/tests/generated_code_proto2_pb.rb
ruby/tests/multi_level_nesting_test_pb.rb
ruby/tests/test_import_proto2_pb.rb
ruby/tests/test_ruby_package_proto2_pb.rb
ruby/Gemfile.lock
Expand Down
2 changes: 2 additions & 0 deletions Makefile.am
Expand Up @@ -1148,6 +1148,8 @@ ruby_EXTRA_DIST= \
ruby/tests/generated_code_proto2_test.rb \
ruby/tests/generated_code_proto2.proto \
ruby/tests/generated_code.proto \
ruby/tests/multi_level_nesting_test.proto \
ruby/tests/multi_level_nesting_test.rb \
ruby/tests/test_import_proto2.proto \
ruby/tests/test_import.proto \
ruby/tests/test_ruby_package_proto2.proto \
Expand Down
6 changes: 6 additions & 0 deletions ruby/Rakefile
Expand Up @@ -104,7 +104,9 @@ genproto_output << "tests/test_ruby_package.rb"
genproto_output << "tests/test_ruby_package_proto2.rb"
genproto_output << "tests/basic_test.rb"
genproto_output << "tests/basic_test_proto2.rb"
genproto_output << "tests/multi_level_nesting_test.rb"
genproto_output << "tests/wrappers.rb"

file "tests/generated_code.rb" => "tests/generated_code.proto" do |file_task|
sh "../src/protoc --ruby_out=. tests/generated_code.proto"
end
Expand Down Expand Up @@ -137,6 +139,10 @@ file "tests/basic_test_proto2.rb" => "tests/basic_test_proto2.proto" do |file_ta
sh "../src/protoc -I../src -I. --ruby_out=. tests/basic_test_proto2.proto"
end

file "tests/multi_level_nesting_test.rb" => "tests/multi_level_nesting_test.proto" do |file_task|
sh "../src/protoc -I../src -I. --ruby_out=. tests/multi_level_nesting_test.proto"
end

file "tests/wrappers.rb" => "../src/google/protobuf/wrappers.proto" do |file_task|
sh "../src/protoc -I../src -I. --ruby_out=tests ../src/google/protobuf/wrappers.proto"
end
Expand Down
19 changes: 19 additions & 0 deletions ruby/tests/multi_level_nesting_test.proto
@@ -0,0 +1,19 @@
syntax = "proto3";

message Function {
string name = 1;
repeated Function.Parameter parameters = 2;
string return_type = 3;

message Parameter {
string name = 1;
Function.Parameter.Value value = 2;

message Value {
oneof type {
string string = 1;
int64 integer = 2;
}
}
}
}
25 changes: 0 additions & 25 deletions ruby/tests/multi_level_nesting_test_pb.rb

This file was deleted.

0 comments on commit 48234f5

Please sign in to comment.