OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] | 5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] |
6 module mojo.test; | 6 module mojo.test; |
7 | 7 |
8 import "mojo/public/interfaces/bindings/tests/rect.mojom"; | 8 import "mojo/public/interfaces/bindings/tests/rect.mojom"; |
9 | 9 |
10 struct NamedRegion { | 10 struct NamedRegion { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 map<uint8, uint8> f2; | 119 map<uint8, uint8> f2; |
120 map<int16, int16> f3; | 120 map<int16, int16> f3; |
121 map<uint16, uint16> f4; | 121 map<uint16, uint16> f4; |
122 map<int32, int32> f5; | 122 map<int32, int32> f5; |
123 map<uint32, uint32> f6; | 123 map<uint32, uint32> f6; |
124 map<int64, int64> f7; | 124 map<int64, int64> f7; |
125 map<uint64, uint64> f8; | 125 map<uint64, uint64> f8; |
126 map<float, float> f9; | 126 map<float, float> f9; |
127 map<double, double> f10; | 127 map<double, double> f10; |
128 map<string, string> f11; | 128 map<string, string> f11; |
129 // TODO(tibell): JS/Java don't support struct as key. | |
130 // map<Rect, Rect> f12; | |
129 }; | 131 }; |
130 | 132 |
131 // Used to verify that various map value types can be encoded and decoded | 133 // Used to verify that various map value types can be encoded and decoded |
132 // successfully. | 134 // successfully. |
133 | 135 |
134 struct MapValueTypes { | 136 struct MapValueTypes { |
135 map<string, array<string>> f0; | 137 map<string, array<string>> f0; |
136 map<string, array<string>?> f1; | 138 map<string, array<string>?> f1; |
137 map<string, array<string?>> f2; | 139 map<string, array<string?>> f2; |
138 map<string, array<string, 2>> f3; | 140 map<string, array<string, 2>> f3; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
379 | 381 |
380 struct ContainsInterfaceRequest { | 382 struct ContainsInterfaceRequest { |
381 SomeInterface& request; | 383 SomeInterface& request; |
382 }; | 384 }; |
383 | 385 |
384 // Used to verify that boolean fields are correctly serialized/deserialized. | 386 // Used to verify that boolean fields are correctly serialized/deserialized. |
385 | 387 |
386 struct SingleBoolStruct { | 388 struct SingleBoolStruct { |
387 bool value; | 389 bool value; |
388 }; | 390 }; |
391 | |
392 // Used to verify that structs containing typemapped types can be hashed (if the | |
393 // typemapped type itself is hashable). | |
394 | |
395 struct ContainsHashable { | |
396 Rect rect; | |
Sam McNally
2016/09/22 05:40:52
TypemappedRect
tibell
2016/09/22 07:18:33
Done.
| |
397 }; | |
OLD | NEW |