Эх сурвалжийг харах

Added a simple message which uses a message and enum from another file.

Bart Hertog 6 жил өмнө
parent
commit
61fbd181e5

+ 1 - 0
build_test.sh

@@ -6,6 +6,7 @@ protoc --plugin=protoc-gen-eams=protoc-gen-eams -I./test/proto --eams_out=./buil
 protoc --plugin=protoc-gen-eams=protoc-gen-eams -I./test/proto --eams_out=./build/EAMS ./test/proto/nested_message.proto
 protoc --plugin=protoc-gen-eams=protoc-gen-eams -I./test/proto --eams_out=./build/EAMS ./test/proto/repeated_fields.proto
 protoc --plugin=protoc-gen-eams=protoc-gen-eams -I./test/proto --eams_out=./build/EAMS ./test/proto/oneof_fields.proto
+protoc --plugin=protoc-gen-eams=protoc-gen-eams -I./test/proto --eams_out=./build/EAMS ./test/proto/include_other_files.proto
 
 # For validation and testing generate the same message using python
 mkdir -p ./build/python

+ 16 - 0
test/proto/file_to_include.proto

@@ -0,0 +1,16 @@
+
+// This file is used to test including other proto files.
+// This is the file which is included in "include_other_files.proto".
+
+syntax = "proto3";
+
+enum CommonStates {
+  Idle   = 0;
+  StateA = 1;
+  StateB = 2;
+}
+
+message CommonMessage {
+  uint32 a = 1;
+  float  b = 2;
+}

+ 11 - 0
test/proto/include_other_files.proto

@@ -0,0 +1,11 @@
+
+// This file is used to test including other proto files.
+
+syntax = "proto3";
+
+import "file_to_include.proto";
+
+message IncludedMessages {
+  CommonStates  state = 1;
+  CommonMessage msg   = 2;
+}