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

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

Issue 23134002: Replace shuffle getters with shuffle method and masks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
Index: tests/lib/typed_data/float32x4_shuffle_test.dart
diff --git a/tests/lib/typed_data/float32x4_shuffle_test.dart b/tests/lib/typed_data/float32x4_shuffle_test.dart
index a863f120d792cbe13c33cd56bbe4ec6964b61b1e..5ae0a079a2d70924508556cb567704523e2b2ac7 100644
--- a/tests/lib/typed_data/float32x4_shuffle_test.dart
+++ b/tests/lib/typed_data/float32x4_shuffle_test.dart
@@ -12,322 +12,322 @@ import 'dart:typed_data';
void testShuffle0() {
var m = new Float32x4(1.0, 2.0, 3.0, 4.0);
var c;
- c = m.xxxx;
+ c = m.shuffle(Float32x4.xxxx);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xxxy;
+ c = m.shuffle(Float32x4.xxxy);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xxxz;
+ c = m.shuffle(Float32x4.xxxz);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xxxw;
+ c = m.shuffle(Float32x4.xxxw);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xxyx;
+ c = m.shuffle(Float32x4.xxyx);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xxyy;
+ c = m.shuffle(Float32x4.xxyy);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xxyz;
+ c = m.shuffle(Float32x4.xxyz);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xxyw;
+ c = m.shuffle(Float32x4.xxyw);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xxzx;
+ c = m.shuffle(Float32x4.xxzx);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xxzy;
+ c = m.shuffle(Float32x4.xxzy);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xxzz;
+ c = m.shuffle(Float32x4.xxzz);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xxzw;
+ c = m.shuffle(Float32x4.xxzw);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xxwx;
+ c = m.shuffle(Float32x4.xxwx);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xxwy;
+ c = m.shuffle(Float32x4.xxwy);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xxwz;
+ c = m.shuffle(Float32x4.xxwz);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xxww;
+ c = m.shuffle(Float32x4.xxww);
Expect.equals(1.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xyxx;
+ c = m.shuffle(Float32x4.xyxx);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xyxy;
+ c = m.shuffle(Float32x4.xyxy);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xyxz;
+ c = m.shuffle(Float32x4.xyxz);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xyxw;
+ c = m.shuffle(Float32x4.xyxw);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xyyx;
+ c = m.shuffle(Float32x4.xyyx);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xyyy;
+ c = m.shuffle(Float32x4.xyyy);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xyyz;
+ c = m.shuffle(Float32x4.xyyz);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xyyw;
+ c = m.shuffle(Float32x4.xyyw);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xyzx;
+ c = m.shuffle(Float32x4.xyzx);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xyzy;
+ c = m.shuffle(Float32x4.xyzy);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xyzz;
+ c = m.shuffle(Float32x4.xyzz);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xyzw;
+ c = m.shuffle(Float32x4.xyzw);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xywx;
+ c = m.shuffle(Float32x4.xywx);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xywy;
+ c = m.shuffle(Float32x4.xywy);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xywz;
+ c = m.shuffle(Float32x4.xywz);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xyww;
+ c = m.shuffle(Float32x4.xyww);
Expect.equals(1.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xzxx;
+ c = m.shuffle(Float32x4.xzxx);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xzxy;
+ c = m.shuffle(Float32x4.xzxy);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xzxz;
+ c = m.shuffle(Float32x4.xzxz);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xzxw;
+ c = m.shuffle(Float32x4.xzxw);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xzyx;
+ c = m.shuffle(Float32x4.xzyx);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xzyy;
+ c = m.shuffle(Float32x4.xzyy);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xzyz;
+ c = m.shuffle(Float32x4.xzyz);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xzyw;
+ c = m.shuffle(Float32x4.xzyw);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xzzx;
+ c = m.shuffle(Float32x4.xzzx);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xzzy;
+ c = m.shuffle(Float32x4.xzzy);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xzzz;
+ c = m.shuffle(Float32x4.xzzz);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xzzw;
+ c = m.shuffle(Float32x4.xzzw);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xzwx;
+ c = m.shuffle(Float32x4.xzwx);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xzwy;
+ c = m.shuffle(Float32x4.xzwy);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xzwz;
+ c = m.shuffle(Float32x4.xzwz);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xzww;
+ c = m.shuffle(Float32x4.xzww);
Expect.equals(1.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xwxx;
+ c = m.shuffle(Float32x4.xwxx);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xwxy;
+ c = m.shuffle(Float32x4.xwxy);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xwxz;
+ c = m.shuffle(Float32x4.xwxz);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xwxw;
+ c = m.shuffle(Float32x4.xwxw);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xwyx;
+ c = m.shuffle(Float32x4.xwyx);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xwyy;
+ c = m.shuffle(Float32x4.xwyy);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xwyz;
+ c = m.shuffle(Float32x4.xwyz);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xwyw;
+ c = m.shuffle(Float32x4.xwyw);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xwzx;
+ c = m.shuffle(Float32x4.xwzx);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xwzy;
+ c = m.shuffle(Float32x4.xwzy);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xwzz;
+ c = m.shuffle(Float32x4.xwzz);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xwzw;
+ c = m.shuffle(Float32x4.xwzw);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.xwwx;
+ c = m.shuffle(Float32x4.xwwx);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.xwwy;
+ c = m.shuffle(Float32x4.xwwy);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.xwwz;
+ c = m.shuffle(Float32x4.xwwz);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.xwww;
+ c = m.shuffle(Float32x4.xwww);
Expect.equals(1.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
@@ -337,322 +337,322 @@ void testShuffle0() {
void testShuffle1() {
var m = new Float32x4(1.0, 2.0, 3.0, 4.0);
var c;
- c = m.yxxx;
+ c = m.shuffle(Float32x4.yxxx);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yxxy;
+ c = m.shuffle(Float32x4.yxxy);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yxxz;
+ c = m.shuffle(Float32x4.yxxz);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yxxw;
+ c = m.shuffle(Float32x4.yxxw);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yxyx;
+ c = m.shuffle(Float32x4.yxyx);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yxyy;
+ c = m.shuffle(Float32x4.yxyy);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yxyz;
+ c = m.shuffle(Float32x4.yxyz);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yxyw;
+ c = m.shuffle(Float32x4.yxyw);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yxzx;
+ c = m.shuffle(Float32x4.yxzx);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yxzy;
+ c = m.shuffle(Float32x4.yxzy);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yxzz;
+ c = m.shuffle(Float32x4.yxzz);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yxzw;
+ c = m.shuffle(Float32x4.yxzw);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yxwx;
+ c = m.shuffle(Float32x4.yxwx);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yxwy;
+ c = m.shuffle(Float32x4.yxwy);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yxwz;
+ c = m.shuffle(Float32x4.yxwz);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yxww;
+ c = m.shuffle(Float32x4.yxww);
Expect.equals(2.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yyxx;
+ c = m.shuffle(Float32x4.yyxx);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yyxy;
+ c = m.shuffle(Float32x4.yyxy);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yyxz;
+ c = m.shuffle(Float32x4.yyxz);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yyxw;
+ c = m.shuffle(Float32x4.yyxw);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yyyx;
+ c = m.shuffle(Float32x4.yyyx);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yyyy;
+ c = m.shuffle(Float32x4.yyyy);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yyyz;
+ c = m.shuffle(Float32x4.yyyz);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yyyw;
+ c = m.shuffle(Float32x4.yyyw);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yyzx;
+ c = m.shuffle(Float32x4.yyzx);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yyzy;
+ c = m.shuffle(Float32x4.yyzy);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yyzz;
+ c = m.shuffle(Float32x4.yyzz);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yyzw;
+ c = m.shuffle(Float32x4.yyzw);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yywx;
+ c = m.shuffle(Float32x4.yywx);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yywy;
+ c = m.shuffle(Float32x4.yywy);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yywz;
+ c = m.shuffle(Float32x4.yywz);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yyww;
+ c = m.shuffle(Float32x4.yyww);
Expect.equals(2.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yzxx;
+ c = m.shuffle(Float32x4.yzxx);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yzxy;
+ c = m.shuffle(Float32x4.yzxy);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yzxz;
+ c = m.shuffle(Float32x4.yzxz);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yzxw;
+ c = m.shuffle(Float32x4.yzxw);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yzyx;
+ c = m.shuffle(Float32x4.yzyx);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yzyy;
+ c = m.shuffle(Float32x4.yzyy);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yzyz;
+ c = m.shuffle(Float32x4.yzyz);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yzyw;
+ c = m.shuffle(Float32x4.yzyw);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yzzx;
+ c = m.shuffle(Float32x4.yzzx);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yzzy;
+ c = m.shuffle(Float32x4.yzzy);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yzzz;
+ c = m.shuffle(Float32x4.yzzz);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yzzw;
+ c = m.shuffle(Float32x4.yzzw);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.yzwx;
+ c = m.shuffle(Float32x4.yzwx);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.yzwy;
+ c = m.shuffle(Float32x4.yzwy);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.yzwz;
+ c = m.shuffle(Float32x4.yzwz);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.yzww;
+ c = m.shuffle(Float32x4.yzww);
Expect.equals(2.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.ywxx;
+ c = m.shuffle(Float32x4.ywxx);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.ywxy;
+ c = m.shuffle(Float32x4.ywxy);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.ywxz;
+ c = m.shuffle(Float32x4.ywxz);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.ywxw;
+ c = m.shuffle(Float32x4.ywxw);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.ywyx;
+ c = m.shuffle(Float32x4.ywyx);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.ywyy;
+ c = m.shuffle(Float32x4.ywyy);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.ywyz;
+ c = m.shuffle(Float32x4.ywyz);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.ywyw;
+ c = m.shuffle(Float32x4.ywyw);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.ywzx;
+ c = m.shuffle(Float32x4.ywzx);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.ywzy;
+ c = m.shuffle(Float32x4.ywzy);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.ywzz;
+ c = m.shuffle(Float32x4.ywzz);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.ywzw;
+ c = m.shuffle(Float32x4.ywzw);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.ywwx;
+ c = m.shuffle(Float32x4.ywwx);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.ywwy;
+ c = m.shuffle(Float32x4.ywwy);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.ywwz;
+ c = m.shuffle(Float32x4.ywwz);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.ywww;
+ c = m.shuffle(Float32x4.ywww);
Expect.equals(2.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
@@ -662,322 +662,322 @@ void testShuffle1() {
void testShuffle2() {
var m = new Float32x4(1.0, 2.0, 3.0, 4.0);
var c;
- c = m.zxxx;
+ c = m.shuffle(Float32x4.zxxx);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zxxy;
+ c = m.shuffle(Float32x4.zxxy);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zxxz;
+ c = m.shuffle(Float32x4.zxxz);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zxxw;
+ c = m.shuffle(Float32x4.zxxw);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zxyx;
+ c = m.shuffle(Float32x4.zxyx);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zxyy;
+ c = m.shuffle(Float32x4.zxyy);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zxyz;
+ c = m.shuffle(Float32x4.zxyz);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zxyw;
+ c = m.shuffle(Float32x4.zxyw);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zxzx;
+ c = m.shuffle(Float32x4.zxzx);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zxzy;
+ c = m.shuffle(Float32x4.zxzy);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zxzz;
+ c = m.shuffle(Float32x4.zxzz);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zxzw;
+ c = m.shuffle(Float32x4.zxzw);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zxwx;
+ c = m.shuffle(Float32x4.zxwx);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zxwy;
+ c = m.shuffle(Float32x4.zxwy);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zxwz;
+ c = m.shuffle(Float32x4.zxwz);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zxww;
+ c = m.shuffle(Float32x4.zxww);
Expect.equals(3.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zyxx;
+ c = m.shuffle(Float32x4.zyxx);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zyxy;
+ c = m.shuffle(Float32x4.zyxy);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zyxz;
+ c = m.shuffle(Float32x4.zyxz);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zyxw;
+ c = m.shuffle(Float32x4.zyxw);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zyyx;
+ c = m.shuffle(Float32x4.zyyx);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zyyy;
+ c = m.shuffle(Float32x4.zyyy);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zyyz;
+ c = m.shuffle(Float32x4.zyyz);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zyyw;
+ c = m.shuffle(Float32x4.zyyw);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zyzx;
+ c = m.shuffle(Float32x4.zyzx);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zyzy;
+ c = m.shuffle(Float32x4.zyzy);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zyzz;
+ c = m.shuffle(Float32x4.zyzz);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zyzw;
+ c = m.shuffle(Float32x4.zyzw);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zywx;
+ c = m.shuffle(Float32x4.zywx);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zywy;
+ c = m.shuffle(Float32x4.zywy);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zywz;
+ c = m.shuffle(Float32x4.zywz);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zyww;
+ c = m.shuffle(Float32x4.zyww);
Expect.equals(3.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zzxx;
+ c = m.shuffle(Float32x4.zzxx);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zzxy;
+ c = m.shuffle(Float32x4.zzxy);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zzxz;
+ c = m.shuffle(Float32x4.zzxz);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zzxw;
+ c = m.shuffle(Float32x4.zzxw);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zzyx;
+ c = m.shuffle(Float32x4.zzyx);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zzyy;
+ c = m.shuffle(Float32x4.zzyy);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zzyz;
+ c = m.shuffle(Float32x4.zzyz);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zzyw;
+ c = m.shuffle(Float32x4.zzyw);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zzzx;
+ c = m.shuffle(Float32x4.zzzx);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zzzy;
+ c = m.shuffle(Float32x4.zzzy);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zzzz;
+ c = m.shuffle(Float32x4.zzzz);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zzzw;
+ c = m.shuffle(Float32x4.zzzw);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zzwx;
+ c = m.shuffle(Float32x4.zzwx);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zzwy;
+ c = m.shuffle(Float32x4.zzwy);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zzwz;
+ c = m.shuffle(Float32x4.zzwz);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zzww;
+ c = m.shuffle(Float32x4.zzww);
Expect.equals(3.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zwxx;
+ c = m.shuffle(Float32x4.zwxx);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zwxy;
+ c = m.shuffle(Float32x4.zwxy);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zwxz;
+ c = m.shuffle(Float32x4.zwxz);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zwxw;
+ c = m.shuffle(Float32x4.zwxw);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zwyx;
+ c = m.shuffle(Float32x4.zwyx);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zwyy;
+ c = m.shuffle(Float32x4.zwyy);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zwyz;
+ c = m.shuffle(Float32x4.zwyz);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zwyw;
+ c = m.shuffle(Float32x4.zwyw);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zwzx;
+ c = m.shuffle(Float32x4.zwzx);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zwzy;
+ c = m.shuffle(Float32x4.zwzy);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zwzz;
+ c = m.shuffle(Float32x4.zwzz);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zwzw;
+ c = m.shuffle(Float32x4.zwzw);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.zwwx;
+ c = m.shuffle(Float32x4.zwwx);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.zwwy;
+ c = m.shuffle(Float32x4.zwwy);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.zwwz;
+ c = m.shuffle(Float32x4.zwwz);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.zwww;
+ c = m.shuffle(Float32x4.zwww);
Expect.equals(3.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
@@ -987,334 +987,367 @@ void testShuffle2() {
void testShuffle3() {
var m = new Float32x4(1.0, 2.0, 3.0, 4.0);
var c;
- c = m.wxxx;
+ c = m.shuffle(Float32x4.wxxx);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wxxy;
+ c = m.shuffle(Float32x4.wxxy);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wxxz;
+ c = m.shuffle(Float32x4.wxxz);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wxxw;
+ c = m.shuffle(Float32x4.wxxw);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wxyx;
+ c = m.shuffle(Float32x4.wxyx);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wxyy;
+ c = m.shuffle(Float32x4.wxyy);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wxyz;
+ c = m.shuffle(Float32x4.wxyz);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wxyw;
+ c = m.shuffle(Float32x4.wxyw);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wxzx;
+ c = m.shuffle(Float32x4.wxzx);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wxzy;
+ c = m.shuffle(Float32x4.wxzy);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wxzz;
+ c = m.shuffle(Float32x4.wxzz);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wxzw;
+ c = m.shuffle(Float32x4.wxzw);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wxwx;
+ c = m.shuffle(Float32x4.wxwx);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wxwy;
+ c = m.shuffle(Float32x4.wxwy);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wxwz;
+ c = m.shuffle(Float32x4.wxwz);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wxww;
+ c = m.shuffle(Float32x4.wxww);
Expect.equals(4.0, c.x);
Expect.equals(1.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wyxx;
+ c = m.shuffle(Float32x4.wyxx);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wyxy;
+ c = m.shuffle(Float32x4.wyxy);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wyxz;
+ c = m.shuffle(Float32x4.wyxz);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wyxw;
+ c = m.shuffle(Float32x4.wyxw);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wyyx;
+ c = m.shuffle(Float32x4.wyyx);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wyyy;
+ c = m.shuffle(Float32x4.wyyy);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wyyz;
+ c = m.shuffle(Float32x4.wyyz);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wyyw;
+ c = m.shuffle(Float32x4.wyyw);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wyzx;
+ c = m.shuffle(Float32x4.wyzx);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wyzy;
+ c = m.shuffle(Float32x4.wyzy);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wyzz;
+ c = m.shuffle(Float32x4.wyzz);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wyzw;
+ c = m.shuffle(Float32x4.wyzw);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wywx;
+ c = m.shuffle(Float32x4.wywx);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wywy;
+ c = m.shuffle(Float32x4.wywy);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wywz;
+ c = m.shuffle(Float32x4.wywz);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wyww;
+ c = m.shuffle(Float32x4.wyww);
Expect.equals(4.0, c.x);
Expect.equals(2.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wzxx;
+ c = m.shuffle(Float32x4.wzxx);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wzxy;
+ c = m.shuffle(Float32x4.wzxy);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wzxz;
+ c = m.shuffle(Float32x4.wzxz);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wzxw;
+ c = m.shuffle(Float32x4.wzxw);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wzyx;
+ c = m.shuffle(Float32x4.wzyx);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wzyy;
+ c = m.shuffle(Float32x4.wzyy);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wzyz;
+ c = m.shuffle(Float32x4.wzyz);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wzyw;
+ c = m.shuffle(Float32x4.wzyw);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wzzx;
+ c = m.shuffle(Float32x4.wzzx);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wzzy;
+ c = m.shuffle(Float32x4.wzzy);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wzzz;
+ c = m.shuffle(Float32x4.wzzz);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wzzw;
+ c = m.shuffle(Float32x4.wzzw);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wzwx;
+ c = m.shuffle(Float32x4.wzwx);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wzwy;
+ c = m.shuffle(Float32x4.wzwy);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wzwz;
+ c = m.shuffle(Float32x4.wzwz);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wzww;
+ c = m.shuffle(Float32x4.wzww);
Expect.equals(4.0, c.x);
Expect.equals(3.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wwxx;
+ c = m.shuffle(Float32x4.wwxx);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wwxy;
+ c = m.shuffle(Float32x4.wwxy);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wwxz;
+ c = m.shuffle(Float32x4.wwxz);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wwxw;
+ c = m.shuffle(Float32x4.wwxw);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(1.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wwyx;
+ c = m.shuffle(Float32x4.wwyx);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wwyy;
+ c = m.shuffle(Float32x4.wwyy);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wwyz;
+ c = m.shuffle(Float32x4.wwyz);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wwyw;
+ c = m.shuffle(Float32x4.wwyw);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(2.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wwzx;
+ c = m.shuffle(Float32x4.wwzx);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wwzy;
+ c = m.shuffle(Float32x4.wwzy);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wwzz;
+ c = m.shuffle(Float32x4.wwzz);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wwzw;
+ c = m.shuffle(Float32x4.wwzw);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(3.0, c.z);
Expect.equals(4.0, c.w);
- c = m.wwwx;
+ c = m.shuffle(Float32x4.wwwx);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(1.0, c.w);
- c = m.wwwy;
+ c = m.shuffle(Float32x4.wwwy);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(2.0, c.w);
- c = m.wwwz;
+ c = m.shuffle(Float32x4.wwwz);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(3.0, c.w);
- c = m.wwww;
+ c = m.shuffle(Float32x4.wwww);
Expect.equals(4.0, c.x);
Expect.equals(4.0, c.y);
Expect.equals(4.0, c.z);
Expect.equals(4.0, c.w);
}
+void testShuffleNonConstant(mask) {
+ var m = new Float32x4(1.0, 2.0, 3.0, 4.0);
+ var c;
+ c = m.shuffle(mask);
+ if (mask == 1) {
+ Expect.equals(2.0, c.x);
+ Expect.equals(1.0, c.y);
+ Expect.equals(1.0, c.z);
+ Expect.equals(1.0, c.w);
+ } else {
+ Expect.equals(Float32x4.yyyy + 1, mask);
+ Expect.equals(3.0, c.x);
+ Expect.equals(2.0, c.y);
+ Expect.equals(2.0, c.z);
+ Expect.equals(2.0, c.w);
+ }
+}
+
+void testInvalidShuffle(mask) {
+ // Not a valid mask.
+ Expect.isFalse(mask <= 255 && mask >= 0);
+ var m = new Float32x4(1.0, 2.0, 3.0, 4.0);
+ var c;
+ Expect.throws(() {
+ c = m.shuffle(mask);
+ });
+}
main() {
- for (int i = 0; i < 20; i++) {
+ var xxxx = Float32x4.xxxx + 1;
+ var yyyy = Float32x4.yyyy + 1;
+ for (int i = 0; i < 4000; i++) {
zra 2013/08/13 23:00:59 Was it necessary to increase this for the optimize
Cutch 2013/08/14 21:15:28 No, left over from testing. I will remove this.
testShuffle0();
testShuffle1();
testShuffle2();
testShuffle3();
+ testShuffleNonConstant(xxxx);
+ testShuffleNonConstant(yyyy);
+ testInvalidShuffle(256);
+ testInvalidShuffle(-1);
}
}

Powered by Google App Engine
This is Rietveld 408576698