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 "sample_import.mojom" | 5 import "sample_import.mojom" |
6 import "sample_import2.mojom" | 6 import "sample_import2.mojom" |
7 | 7 |
8 [JavaPackage="org.chromium.mojo.bindings.test.sample"] | 8 [JavaPackage="org.chromium.mojo.bindings.test.sample"] |
9 module sample { | 9 module sample { |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 }; | 43 }; |
44 | 44 |
45 struct DefaultsTest { | 45 struct DefaultsTest { |
46 int8 a0@0 = -12; | 46 int8 a0@0 = -12; |
47 uint8 a1@1 = sample.kTwelve; | 47 uint8 a1@1 = sample.kTwelve; |
48 int16 a2@2 = 1234; | 48 int16 a2@2 = 1234; |
49 uint16 a3@3 = 34567; | 49 uint16 a3@3 = 34567; |
50 int32 a4@4 = 123456; | 50 int32 a4@4 = 123456; |
51 // TODO(vtl): crbug.com/375522 | 51 // TODO(vtl): crbug.com/375522 |
52 uint32 a5@5 /* = 3456789012 */; | 52 uint32 a5@5 /* = 3456789012 */; |
| 53 int64 a6@6 = 111111111111; |
53 // TODO(vtl): crbug.com/375522 | 54 // TODO(vtl): crbug.com/375522 |
54 int64 a6@6 = 111111111111; | |
55 uint64 a7@7 /* = 9999999999999999999 */; | 55 uint64 a7@7 /* = 9999999999999999999 */; |
56 int32 a8@8 = 0x12345; | 56 int32 a8@8 = 0x12345; |
57 int32 a9@9 = -0x12345; | 57 int32 a9@9 = -0x12345; |
58 int32 a10@10 = +1234; | 58 int32 a10@10 = +1234; |
59 bool a11@11 = true; | 59 bool a11@11 = true; |
60 bool a12@12 = false; | 60 bool a12@12 = false; |
61 float a13@13 = 123.25; | 61 float a13@13 = 123.25; |
62 double a14@14 = 1234567890.123; | 62 double a14@14 = 1234567890.123; |
63 double a15@15 = 1E10; | 63 double a15@15 = 1E10; |
64 double a16@16 = -1.2E+20; | 64 double a16@16 = -1.2E+20; |
65 double a17@17 = +1.23E-20; | 65 double a17@17 = +1.23E-20; |
66 | 66 |
67 // TODO(vtl): Add tests for default vs null when those are implemented (for | 67 // TODO(vtl): Add tests for default vs null when those are implemented (for |
68 // structs, arrays, and strings). | 68 // structs, arrays, and strings). |
69 uint8[] a18@18; | 69 uint8[] a18@18; |
70 string a19@19; | 70 string a19@19; |
71 | 71 |
72 Bar.Type a20@20 = Bar.TYPE_BOTH; | 72 Bar.Type a20@20 = Bar.TYPE_BOTH; |
73 imported.Point a21@21; | 73 imported.Point a21@21; |
74 imported.Thing a22@22; | 74 imported.Thing a22@22 = default; |
75 }; | 75 }; |
76 | 76 |
77 struct StructWithHoleV1 { | 77 struct StructWithHoleV1 { |
78 int32 v1 = 1; | 78 int32 v1 = 1; |
79 int64 v2 = 2; | 79 int64 v2 = 2; |
80 }; | 80 }; |
81 | 81 |
82 struct StructWithHoleV2 { | 82 struct StructWithHoleV2 { |
83 int32 v1 = 1; | 83 int32 v1 = 1; |
84 int64 v2 = 2; | 84 int64 v2 = 2; |
(...skipping 15 matching lines...) Expand all Loading... |
100 DidFrobinate@0(int32 result@0); | 100 DidFrobinate@0(int32 result@0); |
101 }; | 101 }; |
102 | 102 |
103 // This interface is referenced above where it is defined. It also refers to | 103 // This interface is referenced above where it is defined. It also refers to |
104 // itself from a method. | 104 // itself from a method. |
105 interface Port { | 105 interface Port { |
106 PostMessage@0(string message_text@0, Port port@1); | 106 PostMessage@0(string message_text@0, Port port@1); |
107 }; | 107 }; |
108 | 108 |
109 } | 109 } |
OLD | NEW |