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

Unified Diff: dart/tests/lib/typed_data/uint32x4_arithmetic_test.dart

Issue 59073003: Version 0.8.10.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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
Index: dart/tests/lib/typed_data/uint32x4_arithmetic_test.dart
===================================================================
--- dart/tests/lib/typed_data/uint32x4_arithmetic_test.dart (revision 29808)
+++ dart/tests/lib/typed_data/uint32x4_arithmetic_test.dart (working copy)
@@ -1,99 +0,0 @@
-// Copyright (c) 2013, 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
-
-// Library tag to be able to run in html test framework.
-library uint32x4_arithmetic_test;
-
-import "package:expect/expect.dart";
-import 'dart:typed_data';
-
-testAdd() {
- var m = new Uint32x4(0, 0, 0, 0);
- var n = new Uint32x4(-1, -1, -1, -1);
- var o = m + n;
- Expect.equals(4294967295, o.x);
- Expect.equals(4294967295, o.y);
- Expect.equals(4294967295, o.z);
- Expect.equals(4294967295, o.w);
-
- m = new Uint32x4(0, 0, 0, 0);
- n = new Uint32x4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
- o = m + n;
- Expect.equals(4294967295, o.x);
- Expect.equals(4294967295, o.y);
- Expect.equals(4294967295, o.z);
- Expect.equals(4294967295, o.w);
-
- n = new Uint32x4(1, 1, 1, 1);
- m = new Uint32x4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
- o = m + n;
- Expect.equals(0, o.x);
- Expect.equals(0, o.y);
- Expect.equals(0, o.z);
- Expect.equals(0, o.w);
-
- n = new Uint32x4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
- m = new Uint32x4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
- o = m + n;
- Expect.equals(4294967294, o.x);
- Expect.equals(4294967294, o.y);
- Expect.equals(4294967294, o.z);
- Expect.equals(4294967294, o.w);
-
- n = new Uint32x4(1, 0, 0, 0);
- m = new Uint32x4(2, 0, 0, 0);
- o = n + m;
- Expect.equals(3, o.x);
- Expect.equals(0, o.y);
- Expect.equals(0, o.z);
- Expect.equals(0, o.w);
-
- n = new Uint32x4(1, 3, 0, 0);
- m = new Uint32x4(2, 4, 0, 0);
- o = n + m;
- Expect.equals(3, o.x);
- Expect.equals(7, o.y);
- Expect.equals(0, o.z);
- Expect.equals(0, o.w);
-
- n = new Uint32x4(1, 3, 5, 0);
- m = new Uint32x4(2, 4, 6, 0);
- o = n + m;
- Expect.equals(3, o.x);
- Expect.equals(7, o.y);
- Expect.equals(11, o.z);
- Expect.equals(0, o.w);
-
- n = new Uint32x4(1, 3, 5, 7);
- m = new Uint32x4(2, 4, 6, 8);
- o = n + m;
- Expect.equals(3, o.x);
- Expect.equals(7, o.y);
- Expect.equals(11, o.z);
- Expect.equals(15, o.w);
-}
-
-testSub() {
- var m = new Uint32x4(0, 0, 0, 0);
- var n = new Uint32x4(1, 1, 1, 1);
- var o = m - n;
- Expect.equals(4294967295, o.x);
- Expect.equals(4294967295, o.y);
- Expect.equals(4294967295, o.z);
- Expect.equals(4294967295, o.w);
-
- o = n - m;
- Expect.equals(1, o.x);
- Expect.equals(1, o.y);
- Expect.equals(1, o.z);
- Expect.equals(1, o.w);
-}
-
-main() {
- for (int i = 0; i < 20; i++) {
- testAdd();
- testSub();
- }
-}
« no previous file with comments | « dart/tests/lib/typed_data/int32x4_sign_mask_test.dart ('k') | dart/tests/lib/typed_data/uint32x4_list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698