aboutsummaryrefslogtreecommitdiff
path: root/js/test.proto
diff options
context:
space:
mode:
Diffstat (limited to 'js/test.proto')
-rw-r--r--js/test.proto69
1 files changed, 69 insertions, 0 deletions
diff --git a/js/test.proto b/js/test.proto
index 5f9078ef..7c881c0d 100644
--- a/js/test.proto
+++ b/js/test.proto
@@ -100,6 +100,13 @@ message Complex {
repeated string a_repeated_string = 7;
}
+message OuterMessage {
+ // Make sure this doesn't conflict with the other Complex message.
+ message Complex {
+ optional int32 inner_complex_field = 1;
+ }
+}
+
message IsExtension {
extend HasExtensions {
optional IsExtension ext_field = 100;
@@ -138,10 +145,22 @@ message DefaultValues {
optional bytes bytes_field = 8 [default="moo"]; // Base64 encoding is "bW9v"
}
+message FloatingPointFields {
+ optional float optional_float_field = 1;
+ required float required_float_field = 2;
+ repeated float repeated_float_field = 3;
+ optional float default_float_field = 4 [default = 2.0];
+ optional double optional_double_field = 5;
+ required double required_double_field = 6;
+ repeated double repeated_double_field = 7;
+ optional double default_double_field = 8 [default = 2.0];
+}
+
message TestClone {
optional string str = 1;
optional Simple1 simple1 = 3;
repeated Simple1 simple2 = 5;
+ optional bytes bytes_field = 6;
optional string unused = 7;
extensions 10 to max;
}
@@ -210,3 +229,53 @@ message TestMessageWithOneof {
}
}
+message TestEndsWithBytes {
+ optional int32 value = 1;
+ optional bytes data = 2;
+}
+
+
+message Int64Types {
+ optional int64 int64_normal = 1 [jstype=JS_NORMAL];
+ optional sint64 int64_string = 2 [jstype=JS_STRING];
+ optional uint64 int64_number = 3 [jstype=JS_NUMBER];
+
+}
+
+message TestMapFieldsNoBinary {
+
+ map<string, string> map_string_string = 1;
+ map<string, int32> map_string_int32 = 2;
+ map<string, int64> map_string_int64 = 3;
+ map<string, bool> map_string_bool = 4;
+ map<string, double> map_string_double = 5;
+ map<string, MapValueEnumNoBinary> map_string_enum = 6;
+ map<string, MapValueMessageNoBinary> map_string_msg = 7;
+
+ map<int32, string> map_int32_string = 8;
+ map<int64, string> map_int64_string = 9;
+ map<bool, string> map_bool_string = 10;
+
+ optional TestMapFieldsNoBinary test_map_fields = 11;
+ map<string, TestMapFieldsNoBinary> map_string_testmapfields = 12;
+}
+
+enum MapValueEnumNoBinary {
+ MAP_VALUE_FOO_NOBINARY = 0;
+ MAP_VALUE_BAR_NOBINARY = 1;
+ MAP_VALUE_BAZ_NOBINARY = 2;
+}
+
+message MapValueMessageNoBinary {
+
+ optional int32 foo = 1;
+}
+
+message Deeply {
+ message Nested {
+ message Message {
+ optional int32 count = 1;
+ }
+ }
+}
+