Chromium Code Reviews| 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 import "mojo/public/interfaces/bindings/tests/rect.mojom" | 5 import "mojo/public/interfaces/bindings/tests/rect.mojom" |
| 6 | 6 |
| 7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] | 7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] |
| 8 module mojo.test { | 8 module mojo.test { |
| 9 | 9 |
| 10 struct NamedRegion { | 10 struct NamedRegion { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 const int32 TEN_TOO = EType.E2; | 101 const int32 TEN_TOO = EType.E2; |
| 102 EType f0 = E0; // 0 | 102 EType f0 = E0; // 0 |
| 103 EType f1 = E1; // 1 | 103 EType f1 = E1; // 1 |
| 104 EType f2 = E2; // 10 | 104 EType f2 = E2; // 10 |
| 105 EType f3 = E3; // 10 | 105 EType f3 = E3; // 10 |
| 106 EType f4 = E4; // 11 | 106 EType f4 = E4; // 11 |
| 107 int32 f5 = TEN; | 107 int32 f5 = TEN; |
| 108 int32 f6 = ALSO_TEN; | 108 int32 f6 = ALSO_TEN; |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 // Used to verify that all possible Map key field types can be encoded and | |
|
yzshen1
2014/10/15 05:58:02
int64 and uint64? :)
hansmuller
2014/10/15 21:45:46
JS can't really encode 64 bit integers properly bu
| |
| 112 // decoded successfully. | |
| 113 | |
| 114 struct MapFields { | |
| 115 map<bool, bool> f0; | |
| 116 map<int8, int8> f1; | |
| 117 map<uint8, uint8> f2; | |
| 118 map<int16, int16> f3; | |
| 119 map<uint16, uint16> f4; | |
| 120 map<int32, int32> f5; | |
| 121 map<uint32, uint32> f6; | |
| 122 map<float, float> f7; | |
| 123 map<double, double> f8; | |
| 124 map<string, string> f9; | |
|
qsr
2014/10/15 13:03:40
Do you want to test with structs, arrays and map a
hansmuller
2014/10/15 21:45:46
This test was just intended to verify that all pos
yzshen1
2014/10/15 22:22:13
(Out of curiosity) I thought the C++ bindings shou
hansmuller
2014/10/16 20:11:04
- The first two fail in the cpp parser:
File "/
| |
| 125 }; | |
| 126 | |
| 111 } | 127 } |
| OLD | NEW |