From 458075312af281b7a3c16c4f41ff3f70821052e1 Mon Sep 17 00:00:00 2001 From: dsavvinov Date: Wed, 10 Aug 2016 19:34:06 +0300 Subject: [PATCH] Protobuf: reformatted tests for convinience of testing. Removed tests for fixed types (not needed at the moment) --- .../compiler/kotlin/test/cross_branch.proto | 36 ++++++++++--------- .../protobuf/compiler/kotlin/test/fixed.proto | 8 ----- .../compiler/kotlin/test/max_tag_val.proto | 4 +-- .../kotlin/test/nested_messaged.proto | 24 +++++++------ .../compiler/kotlin/test/repeated_fixed.proto | 8 ----- .../kotlin/test/repeated_varints.proto | 9 ----- .../kotlin/test/repeated_zigzag.proto | 2 +- .../compiler/kotlin/test/tag_order.proto | 4 +-- .../kotlin/test/tag_order_shuffled.proto | 4 +-- 9 files changed, 39 insertions(+), 60 deletions(-) delete mode 100644 proto/compiler/google/src/google/protobuf/compiler/kotlin/test/fixed.proto delete mode 100644 proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_fixed.proto diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/cross_branch.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/cross_branch.proto index e884f42400f..46d57657256 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/cross_branch.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/cross_branch.proto @@ -1,23 +1,25 @@ syntax = "proto3"; -message Grandfather { - message LeftFather { - message LeftLeftSon { - int32 son_field = 1; +message CrossBranch { + message Grandfather { + message LeftFather { + message LeftLeftSon { + int32 son_field = 1; + } + + message LeftRightSon { + int32 son_field = 1; + } } - message LeftRightSon { - int32 son_field = 1; + message RightFather { + message RightLeftSon { + Grandfather.LeftFather.LeftLeftSon son_field = 1; + } + + message RightRightSon { + Grandfather.LeftFather.LeftRightSon son_field = 1; + } } } - - message RightFather { - message RightLeftSon { - Grandfather.LeftFather.LeftLeftSon son_field = 1; - } - - message RightRightSon { - Grandfather.LeftFather.LeftRightSon son_field = 1; - } - } -} +} \ No newline at end of file diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/fixed.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/fixed.proto deleted file mode 100644 index 7eacc9bd815..00000000000 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/fixed.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -message MessageFixed { - fixed32 fix32 = 1; - fixed64 fix64 = 2; - sfixed32 sfix32 = 3; - sfixed64 sfix64 = 4; -} diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/max_tag_val.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/max_tag_val.proto index 3f5602960f7..f90dc140adf 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/max_tag_val.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/max_tag_val.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -message Msg { +message MaxTagVal { int32 int = 536870911; - repeated Enum enum_array = 536870910; + repeated sint64 slong_array = 536870910; sint32 sint = 536870909; diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/nested_messaged.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/nested_messaged.proto index 820587dc80c..4e6c5c07cf7 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/nested_messaged.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/nested_messaged.proto @@ -1,15 +1,17 @@ syntax = "proto3"; -message Grandfather { - message Father { - message Son { - int32 son_field = 1; - } +message NestedMessage { + message Grandfather { + message Father { + message Son { + int32 son_field = 1; + } - Son first_son = 1; - Son second_son = 2; - } + Son first_son = 1; + Son second_son = 2; + } - Father first_father = 1; - Father second_father = 2; -} + Father first_father = 1; + Father second_father = 2; + } +} \ No newline at end of file diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_fixed.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_fixed.proto deleted file mode 100644 index 664c2720362..00000000000 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_fixed.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -message MessageRepeateFixed { - repeated fixed32 fix32 = 1; - repeated fixed64 fix64 = 2; - repeated sfixed32 sfix32 = 3; - repeated sfixed64 sfix64 = 4; -} diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_varints.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_varints.proto index 9a34b981495..06ac565616a 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_varints.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_varints.proto @@ -8,13 +8,4 @@ message MessageRepeatedVarints { repeated bool bl = 5; repeated uint32 uint = 7; repeated uint64 ulong = 8; - - enum TestEnum { - firstVal = 0; - secondVal = 1; - thirdVal = 2; - } - - repeated TestEnum enumField = 6; - } diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_zigzag.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_zigzag.proto index b12251c572f..06f685fd349 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_zigzag.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/repeated_zigzag.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -message MessageZigZag { +message MessageRepeatedZigZag { repeated sint32 int = 1; repeated sint64 long = 2; } diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/tag_order.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/tag_order.proto index 4b675cfcfd5..830edd59a93 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/tag_order.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/tag_order.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -message Msg { +message TagOrder { int32 int = 3423; - repeated Enum enum_array = 12321; + repeated sint64 slong_array = 12321; sint32 sint = 8; enum Enum { diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/tag_order_shuffled.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/tag_order_shuffled.proto index 13dab67850a..7a626786138 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/tag_order_shuffled.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/tag_order_shuffled.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -message Msg { +message TagOrderShuffled { sint32 sint = 8; Enum enum_field = 938423; - repeated Enum enum_array = 12321; + repeated sint64 slong_array = 12321; int32 int = 3423; enum Enum { first_val = 0;