Index: mojo/public/interfaces/bindings/tests/test_structs.mojom |
diff --git a/mojo/public/interfaces/bindings/tests/test_structs.mojom b/mojo/public/interfaces/bindings/tests/test_structs.mojom |
index 6af00866fec053dbc001cc1572a839ca01d6e611..20631496d153ab813db5eb97084c6e778d547400 100644 |
--- a/mojo/public/interfaces/bindings/tests/test_structs.mojom |
+++ b/mojo/public/interfaces/bindings/tests/test_structs.mojom |
@@ -108,4 +108,34 @@ struct ScopedConstants { |
int32 f6 = ALSO_TEN; |
}; |
+// Used to verify that all possible Map key field types can be encoded and |
+// decoded successfully. |
+ |
+struct MapKeyTypes { |
+ map<bool, bool> f0; |
+ map<int8, int8> f1; |
+ map<uint8, uint8> f2; |
+ map<int16, int16> f3; |
+ map<uint16, uint16> f4; |
+ map<int32, int32> f5; |
+ map<uint32, uint32> f6; |
+ map<int64, int64> f7; |
+ map<uint64, uint64> f8; |
+ map<float, float> f9; |
+ map<double, double> f10; |
+ map<string, string> f11; |
+}; |
+ |
+// Used to verify that some common or difficult value types can be encoded and |
+// decoded successfully. |
+ |
+struct MapValueTypes { |
+ map<string, array<string>> f0; |
+ map<string, array<string>?> f1; |
+ map<string, array<string?>> f2; |
+ map<string, array<string, 2>> f3; |
+ map<string, array<array<string, 2>?>> f4; |
+ map<string, array<array<string, 2>, 1>> f5; |
+}; |
+ |
} |