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

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

Issue 13936009: Inline Float32x4 constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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_test.dart
diff --git a/tests/lib/typed_data/float32x4_test.dart b/tests/lib/typed_data/float32x4_test.dart
index 9dbaab4c0b19c151e40585d4719437fe394e99fe..7f6aa2f082d9ae91541ef8e798cd46d1a637a4c8 100644
--- a/tests/lib/typed_data/float32x4_test.dart
+++ b/tests/lib/typed_data/float32x4_test.dart
@@ -350,8 +350,36 @@ testGetters() {
Expect.equals(false, m.flagW);
}
+void testSplat() {
+ var f = new Float32x4.splat(2.0);
+ Expect.equals(2.0, f.x);
+ Expect.equals(2.0, f.y);
+ Expect.equals(2.0, f.z);
+ Expect.equals(2.0, f.w);
+}
+
+void testZero() {
+ var f = new Float32x4.zero();
+ Expect.equals(0.0, f.x);
+ Expect.equals(0.0, f.y);
+ Expect.equals(0.0, f.z);
+ Expect.equals(0.0, f.w);
+}
+
+void testConstructor() {
+ var f = new Float32x4(1.0, 2.0, 3.0, 4.0);
+ Expect.equals(1.0, f.x);
+ Expect.equals(2.0, f.y);
+ Expect.equals(3.0, f.z);
+ Expect.equals(4.0, f.w);
+}
+
+
main() {
- for (int i = 0; i < 3000; i++) {
+ for (int i = 0; i < 4000; i++) {
+ testConstructor();
+ testSplat();
+ testZero();
testAdd();
testGetters();
testSetters();
« runtime/vm/intermediate_language_arm.cc ('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