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

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

Issue 24240020: Cleanup bit casting methods between SIMD types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« runtime/vm/intermediate_language.h ('K') | « sdk/lib/typed_data/typed_data.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/float32x4_test.dart
diff --git a/tests/lib/typed_data/float32x4_test.dart b/tests/lib/typed_data/float32x4_test.dart
index 41401b806d19f791413f92704f83ebbd7c5097de..bc1b16478d44ab216d52a4ce718dc96435bcbd75 100644
--- a/tests/lib/typed_data/float32x4_test.dart
+++ b/tests/lib/typed_data/float32x4_test.dart
@@ -232,13 +232,13 @@ testSelect() {
testConversions() {
var m = new Uint32x4(0x3F800000, 0x40000000, 0x40400000, 0x40800000);
- var n = m.toFloat32x4();
+ var n = new Float32x4.fromUint32x4Bits(m);
Expect.equals(1.0, n.x);
Expect.equals(2.0, n.y);
Expect.equals(3.0, n.z);
Expect.equals(4.0, n.w);
n = new Float32x4(5.0, 6.0, 7.0, 8.0);
- m = n.toUint32x4();
+ m = new Uint32x4.fromFloat32x4Bits(n);
Expect.equals(0x40A00000, m.x);
Expect.equals(0x40C00000, m.y);
Expect.equals(0x40E00000, m.z);
@@ -246,16 +246,16 @@ testConversions() {
// Flip sign using bit-wise operators.
n = new Float32x4(9.0, 10.0, 11.0, 12.0);
m = new Uint32x4(0x80000000, 0x80000000, 0x80000000, 0x80000000);
- var nMask = n.toUint32x4();
+ var nMask = new Uint32x4.fromFloat32x4Bits(n);
nMask = nMask ^ m; // flip sign.
- n = nMask.toFloat32x4();
+ n = new Float32x4.fromUint32x4Bits(nMask);
Expect.equals(-9.0, n.x);
Expect.equals(-10.0, n.y);
Expect.equals(-11.0, n.z);
Expect.equals(-12.0, n.w);
- nMask = n.toUint32x4();
+ nMask = new Uint32x4.fromFloat32x4Bits(n);
nMask = nMask ^ m; // flip sign.
- n = nMask.toFloat32x4();
+ n = new Float32x4.fromUint32x4Bits(nMask);
Expect.equals(9.0, n.x);
Expect.equals(10.0, n.y);
Expect.equals(11.0, n.z);
« runtime/vm/intermediate_language.h ('K') | « sdk/lib/typed_data/typed_data.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698