Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Tests typed-data buffer classes. | 5 // Tests typed-data buffer classes. |
| 6 | 6 |
| 7 import "dart:typed_data"; | |
|
Lasse Reichstein Nielsen
2015/10/09 06:22:31
I don't see any particular value in moving the dar
nweiz
2015/10/13 19:51:40
It's very consistent with other packages to put da
| |
| 8 | |
| 7 import "package:typed_data/typed_buffers.dart"; | 9 import "package:typed_data/typed_buffers.dart"; |
| 8 import "package:unittest/unittest.dart"; | 10 import "package:test/test.dart"; |
|
Lasse Reichstein Nielsen
2015/10/09 06:22:30
If you are reorganizing imports systematically (in
nweiz
2015/10/13 19:51:39
Done.
| |
| 9 import "dart:typed_data"; | |
| 10 | 11 |
| 11 main() { | 12 main() { |
| 12 testUint(8, (l) => new Uint8Buffer(l)); | 13 testUint(8, (l) => new Uint8Buffer(l)); |
| 13 testInt(8, (l) => new Int8Buffer(l)); | 14 testInt(8, (l) => new Int8Buffer(l)); |
| 14 test("Uint8ClampedBuffer", () { | 15 test("Uint8ClampedBuffer", () { |
| 15 testIntBuffer(8, 0, 255, (l) => new Uint8ClampedBuffer(l), clampUint8); | 16 testIntBuffer(8, 0, 255, (l) => new Uint8ClampedBuffer(l), clampUint8); |
| 16 }); | 17 }); |
| 17 testUint(16, (l) => new Uint16Buffer(l)); | 18 testUint(16, (l) => new Uint16Buffer(l)); |
| 18 testInt(16, (l) => new Int16Buffer(l)); | 19 testInt(16, (l) => new Int16Buffer(l)); |
| 19 testUint(32, (l) => new Uint32Buffer(l)); /// 01: ok | 20 testUint(32, (l) => new Uint32Buffer(l)); /// 01: ok |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 bool matches(item, Map matchState) { | 413 bool matches(item, Map matchState) { |
| 413 if (item is! Int32x4) return false; | 414 if (item is! Int32x4) return false; |
| 414 Int32x4 value = item; | 415 Int32x4 value = item; |
| 415 return result.x == value.x && result.y == value.y && | 416 return result.x == value.x && result.y == value.y && |
| 416 result.z == value.z && result.w == value.w; | 417 result.z == value.z && result.w == value.w; |
| 417 } | 418 } |
| 418 | 419 |
| 419 Description describe(Description description) => | 420 Description describe(Description description) => |
| 420 description.add('Int32x4.=='); | 421 description.add('Int32x4.=='); |
| 421 } | 422 } |
| OLD | NEW |