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

Unified Diff: tests/Sk4xTest.cpp

Issue 1001453006: Add Load2/store2 to Sk4x (dumb impl for now) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « src/core/Sk4x.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Sk4xTest.cpp
diff --git a/tests/Sk4xTest.cpp b/tests/Sk4xTest.cpp
index 1cecd4f1fcec19ab3fffc74425661c656360eaa4..05863ffaf7d57b2c41dbcd1d41e3f184cd23214e 100644
--- a/tests/Sk4xTest.cpp
+++ b/tests/Sk4xTest.cpp
@@ -42,6 +42,15 @@ DEF_TEST(Sk4x_LoadStore, r) {
fs[2] == 6 &&
fs[3] == 7 &&
fs[4] == 8);
+
+ // Load2 and store2().
+ float two[2] = { 1.0f, 2.0f };
+ Sk4f twoIn4f = Sk4f::Load2(two);
+ twoIn4f = twoIn4f.multiply(Sk4f(2.0f));
+ twoIn4f.store2(two);
+
+ REPORTER_ASSERT(r, two[0] == 2.0f);
+ REPORTER_ASSERT(r, two[1] == 4.0f);
}
DEF_TEST(Sk4x_Conversions, r) {
« no previous file with comments | « src/core/Sk4x.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698