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.mojom.sample"] | 8 [JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"] |
9 module sample { | 9 module sample { |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 bool[] array_of_bools@14; | 44 bool[] array_of_bools@14; |
45 }; | 45 }; |
46 | 46 |
47 struct DefaultsTest { | 47 struct DefaultsTest { |
48 int8 a0@0 = -12; | 48 int8 a0@0 = -12; |
49 uint8 a1@1 = sample.kTwelve; | 49 uint8 a1@1 = sample.kTwelve; |
50 int16 a2@2 = 1234; | 50 int16 a2@2 = 1234; |
51 uint16 a3@3 = 34567; | 51 uint16 a3@3 = 34567; |
52 int32 a4@4 = 123456; | 52 int32 a4@4 = 123456; |
53 uint32 a5@5 = 3456789012; | 53 uint32 a5@5 = 3456789012; |
54 int64 a6@6 = 111111111111; | 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 = BOTH; | 72 Bar.Type a20@20 = BOTH; |
73 imported.Point a21@21; | 73 imported.Point a21@21; |
74 imported.Thing a22@22 = default; | 74 imported.Thing a22@22 = default; |
| 75 |
| 76 uint64 a23@23 = 0xFFFFFFFFFFFFFFFF; |
| 77 int64 a24@24 = 0x123456789; |
| 78 int64 a25@25 = -0x123456789; |
75 }; | 79 }; |
76 | 80 |
77 struct StructWithHoleV1 { | 81 struct StructWithHoleV1 { |
78 int32 v1 = 1; | 82 int32 v1 = 1; |
79 int64 v2 = 2; | 83 int64 v2 = 2; |
80 }; | 84 }; |
81 | 85 |
82 struct StructWithHoleV2 { | 86 struct StructWithHoleV2 { |
83 int32 v1 = 1; | 87 int32 v1 = 1; |
84 int64 v2 = 2; | 88 int64 v2 = 2; |
(...skipping 15 matching lines...) Expand all Loading... |
100 DidFrobinate@0(int32 result@0); | 104 DidFrobinate@0(int32 result@0); |
101 }; | 105 }; |
102 | 106 |
103 // This interface is referenced above where it is defined. It also refers to | 107 // This interface is referenced above where it is defined. It also refers to |
104 // itself from a method. | 108 // itself from a method. |
105 interface Port { | 109 interface Port { |
106 PostMessage@0(string message_text@0, Port port@1); | 110 PostMessage@0(string message_text@0, Port port@1); |
107 }; | 111 }; |
108 | 112 |
109 } | 113 } |
OLD | NEW |