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

Unified Diff: client/tests/client/dom/TypedArrays3Test.dart

Issue 9959048: Remove unused typed array factory constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/client/client.status ('k') | client/tests/client/html/TypedArrays3Test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/client/dom/TypedArrays3Test.dart
diff --git a/client/tests/client/dom/TypedArrays3Test.dart b/client/tests/client/dom/TypedArrays3Test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..f5c9cd538af818c5cdbe82b844093ab77acbcc6f
--- /dev/null
+++ b/client/tests/client/dom/TypedArrays3Test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#library('TypedArrays2Test');
+#import('../../../../lib/unittest/unittest_dom.dart');
+#import('dart:dom');
+
+main() {
+
+ forLayoutTests();
+
+ test('setElementsTest_dynamic', () {
+ var a1 = new Int8Array(1024);
+
+ a1.setElements([0x50,0x60,0x70], 4);
+
+ var a2 = new Uint32Array.fromBuffer(a1.buffer);
+ Expect.equals(0x00000000, a2[0]);
+ Expect.equals(0x00706050, a2[1]);
+
+ a2.setElements([0x01020304], 2);
+ Expect.equals(0x04, a1[8]);
+ Expect.equals(0x01, a1[11]);
+ });
+
+ test('setElementsTest_typed', () {
+ Int8Array a1 = new Int8Array(1024);
+
+ a1.setElements([0x50,0x60,0x70], 4);
+
+ Uint32Array a2 = new Uint32Array.fromBuffer(a1.buffer);
+ Expect.equals(0x00000000, a2[0]);
+ Expect.equals(0x00706050, a2[1]);
+
+ a2.setElements([0x01020304], 2);
+ Expect.equals(0x04, a1[8]);
+ Expect.equals(0x01, a1[11]);
+ });
+}
« no previous file with comments | « client/tests/client/client.status ('k') | client/tests/client/html/TypedArrays3Test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698