Chromium Code Reviews| Index: tests/dom/typed_arrays_1_test.dart |
| diff --git a/tests/dom/typed_arrays_1_test.dart b/tests/dom/typed_arrays_1_test.dart |
| index c071ff32fc6b9114105a322954c642b25c8105ca..b683337a8046dde8f55754f22d7cade1fa977a76 100644 |
| --- a/tests/dom/typed_arrays_1_test.dart |
| +++ b/tests/dom/typed_arrays_1_test.dart |
| @@ -33,6 +33,26 @@ main() { |
| }); |
| + test('aliasiClampedTest', () { |
|
podivilov
2012/05/02 14:54:37
It would make more sense to update html versions o
Anton Muhin
2012/05/02 14:56:32
I hope they'd be merged.
In any event, I am not s
|
| + var a1 = new Uint8ClampedArray.fromList([0,0,1,0x45]); |
| + var a2 = new Float32Array.fromBuffer(a1.buffer); |
| + |
| + Expect.equals(1, a2.length); |
| + |
| + // 0x45010000 = 2048+16 |
| + Expect.equals(2048 + 16, a2[0]); |
| + |
| + a1[2] = 0; |
| + // 0x45000000 = 2048 |
| + Expect.equals(2048, a2[0]); |
| + |
| + a1[3]--; |
| + a1[2] += 128; |
| + // 0x44800000 = 1024 |
| + Expect.equals(1024, a2[0]); |
| + |
| + }); |
| + |
| test('typeTests', () { |
| var a = new Float32Array(10); |
| Expect.isTrue(a is List); |