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

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

Issue 394803002: Revert "Don't use a float32list as storage for simd." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « tests/lib/typed_data/int32x4_list_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/typed_data/int32x4_test.dart
diff --git a/tests/lib/typed_data/int32x4_test.dart b/tests/lib/typed_data/int32x4_test.dart
deleted file mode 100644
index d4893c7459aa852ee1168f4a7605bda51cbaf92f..0000000000000000000000000000000000000000
--- a/tests/lib/typed_data/int32x4_test.dart
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2014, 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 int32x4_test;
-
-import 'package:expect/expect.dart';
-import 'dart:typed_data';
-
-void testBadArguments() {
- Expect.throws(() => new Int32x4(null, 2, 3, 4),
- (e) => e is ArgumentError);
- Expect.throws(() => new Int32x4(1, null, 3, 4),
- (e) => e is ArgumentError);
- Expect.throws(() => new Int32x4(1, 2, null, 4),
- (e) => e is ArgumentError);
- Expect.throws(() => new Int32x4(1, 2, 3, null),
- (e) => e is ArgumentError);
- // Use a local variable typed as dynamic to avoid static warnings.
- var str = "foo";
- Expect.throws(() => new Int32x4(str, 2, 3, 4),
- (e) => e is ArgumentError || e is TypeError);
- Expect.throws(() => new Int32x4(1, str, 3, 4),
- (e) => e is ArgumentError || e is TypeError);
- Expect.throws(() => new Int32x4(1, 2, str, 4),
- (e) => e is ArgumentError || e is TypeError);
- Expect.throws(() => new Int32x4(1, 2, 3, str),
- (e) => e is ArgumentError || e is TypeError);
- // Use a local variable typed as dynamic to avoid static warnings.
- var d = 0.5;
- Expect.throws(() => new Int32x4(d, 2, 3, 4),
- (e) => e is ArgumentError || e is TypeError);
- Expect.throws(() => new Int32x4(1, d, 3, 4),
- (e) => e is ArgumentError || e is TypeError);
- Expect.throws(() => new Int32x4(1, 2, d, 4),
- (e) => e is ArgumentError || e is TypeError);
- Expect.throws(() => new Int32x4(1, 2, 3, d),
- (e) => e is ArgumentError || e is TypeError);
-}
-
-void testBigArguments() {
- var tests = [
- [0x8901234567890, 0x34567890],
- [0x89012A4567890, -1537836912],
- [0x80000000, -2147483648],
- [-0x80000000, -2147483648],
- [0x7fffffff, 2147483647],
- [-0x7fffffff, -2147483647],
- ];
- var int32x4;
-
- for (var test in tests) {
- var input = test[0];
- var expected = test[1];
-
- int32x4 = new Int32x4(input, 2, 3, 4);
- Expect.equals(expected, int32x4.x);
- Expect.equals(2, int32x4.y);
- Expect.equals(3, int32x4.z);
- Expect.equals(4, int32x4.w);
-
- int32x4 = new Int32x4(1, input, 3, 4);
- Expect.equals(1, int32x4.x);
- Expect.equals(expected, int32x4.y);
- Expect.equals(3, int32x4.z);
- Expect.equals(4, int32x4.w);
-
- int32x4 = new Int32x4(1, 2, input, 4);
- Expect.equals(1, int32x4.x);
- Expect.equals(2, int32x4.y);
- Expect.equals(expected, int32x4.z);
- Expect.equals(4, int32x4.w);
-
- int32x4 = new Int32x4(1, 2, 3, input);
- Expect.equals(1, int32x4.x);
- Expect.equals(2, int32x4.y);
- Expect.equals(3, int32x4.z);
- Expect.equals(expected, int32x4.w);
- }
-}
-
-main() {
- for (int i = 0; i < 20; i++) {
- testBigArguments();
- testBadArguments();
- }
-}
« no previous file with comments | « tests/lib/typed_data/int32x4_list_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698