aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkNxTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-11-30 12:07:20 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-01 19:26:02 +0000
commit213d8214628ec7a844f00b5b7bb63b9bf02d7303 (patch)
treed1ec7aece9b35d43d8f41046f70dc32730dd7884 /tests/SkNxTest.cpp
parenta158e174582c96c948c68b3f48d21c2e24fbad78 (diff)
add Load2() to Sk4f
and test it. Change-Id: Ib0c2cf93c63d8d3c36a7d4d60bbec4ecede29bc7 Reviewed-on: https://skia-review.googlesource.com/78480 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/SkNxTest.cpp')
-rw-r--r--tests/SkNxTest.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/SkNxTest.cpp b/tests/SkNxTest.cpp
index afa6750799..069f1bc43e 100644
--- a/tests/SkNxTest.cpp
+++ b/tests/SkNxTest.cpp
@@ -406,3 +406,20 @@ DEF_TEST(SkNx_thenElse, r) {
REPORTER_ASSERT(r, fslo[0] == 1);
REPORTER_ASSERT(r, fslo[1] == -1);
}
+
+DEF_TEST(Sk4f_Load2, r) {
+ float xy[8] = { 0,1,2,3,4,5,6,7 };
+
+ Sk4f x,y;
+ Sk4f::Load2(xy, &x,&y);
+
+ REPORTER_ASSERT(r, x[0] == 0);
+ REPORTER_ASSERT(r, x[1] == 2);
+ REPORTER_ASSERT(r, x[2] == 4);
+ REPORTER_ASSERT(r, x[3] == 6);
+
+ REPORTER_ASSERT(r, y[0] == 1);
+ REPORTER_ASSERT(r, y[1] == 3);
+ REPORTER_ASSERT(r, y[2] == 5);
+ REPORTER_ASSERT(r, y[3] == 7);
+}