Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1974)

Side by Side Diff: mojo/public/interfaces/bindings/tests/test_structs.mojom

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 double f2 = V2; 160 double f2 = V2;
161 float f3 = V3; 161 float f3 = V3;
162 float f4 = V4; 162 float f4 = V4;
163 float f5 = V5; 163 float f5 = V5;
164 float f6 = V6; 164 float f6 = V6;
165 double f7 = V7; 165 double f7 = V7;
166 double f8 = V8; 166 double f8 = V8;
167 double f9 = V9; 167 double f9 = V9;
168 }; 168 };
169 169
170 // Used to verify that various signed integer values can be encoded and
171 // decoded correctly.
172
173 struct IntegerNumberValues {
174 const int8 V0 = -128; // Minimum
175 const int8 V1 = -1; // -1
176 const int8 V2 = 0; // 0
177 const int8 V3 = 42; // An arbitrary valid value.
178 const int8 V4 = 127; // Maximum
179
180 const int16 V5 = -32768; // ...
181 const int16 V6 = -1;
182 const int16 V7 = 0;
183 const int16 V8 = 12345;
184 const int16 V9 = 32767;
185
186 // MSVC can't parse -2147483648 so V10 is intentionally off by one.
187 // See http://msdn.microsoft.com/en-us/library/4kh09110.aspx
188 // Tests may override V10.
189 const int32 V10 = -2147483647;
190 const int32 V11 = -1;
191 const int32 V12 = 0;
192 const int32 V13 = 1234567890;
193 const int32 V14 = 2147483647;
194
195 // The limits for JavaScript integers are +/- (2^53 - 1).
196 const int64 V15 = -9007199254740991; // Number.MIN_SAFE_INTEGER
197 const int64 V16 = -1;
198 const int64 V17 = 0;
199 const int64 V18 = 1234567890123456;
200 const int64 V19 = 9007199254740991; // Number.MAX_SAFE_INTEGER
201
202 int8 f0 = V0;
203 int8 f1 = V1;
204 int8 f2 = V2;
205 int8 f3 = V3;
206 int8 f4 = V4;
207
208 int16 f5 = V5;
209 int16 f6 = V6;
210 int16 f7 = V7;
211 int16 f8 = V8;
212 int16 f9 = V9;
213
214 int32 f10 = V10;
215 int32 f11 = V11;
216 int32 f12 = V12;
217 int32 f13 = V13;
218 int32 f14 = V14;
219
220 int64 f15 = V15;
221 int64 f16 = V16;
222 int64 f17 = V17;
223 int64 f18 = V18;
224 int64 f19 = V19;
225 };
226
227 // Used to verify that various unsigned integer values can be encoded and
228 // decoded correctly.
229
230 struct UnsignedNumberValues {
231 const uint8 V0 = 0; // Minimum = 0.
232 const uint8 V1 = 42; // An arbitrary valid value.
233 const uint8 V2 = 0xFF; // Maximum
234
235 const uint16 V3 = 0; // ...
236 const uint16 V4 = 12345;
237 const uint16 V5 = 0xFFFF;
238
239 const uint32 V6 = 0;
240 const uint32 V7 = 1234567890;
241 const uint32 V8 = 0xFFFFFFFF;
242
243 // The limits for JavaScript integers are +/- (2^53 - 1).
244 const uint64 V9 = 0;
245 const uint64 V10 = 1234567890123456;
246 const uint64 V11 = 9007199254740991; // Number.MAX_SAFE_INTEGER
247
248 uint8 f0 = V0;
249 uint8 f1 = V1;
250 uint8 f2 = V2;
251
252 uint16 f3 = V3;
253 uint16 f4 = V4;
254 uint16 f5 = V5;
255
256 uint32 f6 = V6;
257 uint32 f7 = V7;
258 uint32 f8 = V8;
259
260 uint64 f9 = V9;
261 uint64 f10 = V10;
262 uint64 f11 = V11;
263 };
264
170 // Used to verify that various (packed) boolean array values can be encoded 265 // Used to verify that various (packed) boolean array values can be encoded
171 // and decoded correctly. 266 // and decoded correctly.
172 267
173 struct BitArrayValues { 268 struct BitArrayValues {
174 array<bool, 1> f0; 269 array<bool, 1> f0;
175 array<bool, 7> f1; 270 array<bool, 7> f1;
176 array<bool, 9> f2; 271 array<bool, 9> f2;
177 array<bool> f3; 272 array<bool> f3;
178 array<array<bool>> f4; 273 array<array<bool>> f4;
179 array<array<bool>?> f5; 274 array<array<bool>?> f5;
180 array<array<bool, 2>?> f6; 275 array<array<bool, 2>?> f6;
181 }; 276 };
OLDNEW
« no previous file with comments | « mojo/public/go/system/impl/mojo_types.go ('k') | mojo/public/java/system/src/org/chromium/mojo/system/Core.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698