aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/Tests/unittest_objc.proto
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2018-01-03 11:19:53 -0500
committerGravatar Thomas Van Lenten <thomasvl@google.com>2018-01-03 11:46:03 -0500
commit156161dfcde38b72c55ead02cacff7087c93a4d8 (patch)
treef2c3f5e9b754514d5cf4422c2959ad6fc1eae03b /objectivec/Tests/unittest_objc.proto
parent8529f2aee33ae793c9ce362a45370b98f675370a (diff)
Properly copy maps with string keys but pod values.
Add tests to cover all the common special casing in the runtime code to ensure things come out correctly.
Diffstat (limited to 'objectivec/Tests/unittest_objc.proto')
-rw-r--r--objectivec/Tests/unittest_objc.proto21
1 files changed, 21 insertions, 0 deletions
diff --git a/objectivec/Tests/unittest_objc.proto b/objectivec/Tests/unittest_objc.proto
index e5577faf..b0eb4723 100644
--- a/objectivec/Tests/unittest_objc.proto
+++ b/objectivec/Tests/unittest_objc.proto
@@ -58,6 +58,27 @@ message TestRecursiveMessageWithRepeatedField {
map<string, string> str_to_str = 5;
}
+// Message with a few types of maps to cover the different custom flows
+// in the runtime.
+message TestMessageOfMaps {
+ map<string, string> str_to_str = 1;
+
+ map<string, int32> str_to_int = 2;
+ map<int32, string> int_to_str = 3;
+ map<int32, int32> int_to_int = 4;
+
+ map<string, bool> str_to_bool = 5;
+ map<bool, string> bool_to_str = 6;
+ map<bool, bool> bool_to_bool = 7;
+
+ map<int32, bool> int_to_bool = 8;
+ map<bool, int32> bool_to_int = 9;
+
+ map<string, TestAllTypes> str_to_msg = 10;
+ map<int32, TestAllTypes> int_to_msg = 11;
+ map<bool, TestAllTypes> bool_to_msg = 12;
+}
+
// Recursive message and extension to for testing autocreators at different
// depths.
message TestRecursiveExtension {