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

Unified Diff: tests/SkNxTest.cpp

Issue 1109643002: Mike's radial gradient CL with better float -> int. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: build fixes Created 5 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
« no previous file with comments | « src/opts/SkNx_sse.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SkNxTest.cpp
diff --git a/tests/SkNxTest.cpp b/tests/SkNxTest.cpp
index af6918e38c0ec500dcf666583aa0fb660797533a..25ece3867be090f013f5d9db3520d2f67d979996 100644
--- a/tests/SkNxTest.cpp
+++ b/tests/SkNxTest.cpp
@@ -89,6 +89,12 @@ void test_Ni(skiatest::Reporter* r) {
case 4: REPORTER_ASSERT(r, vals[2] == c && vals[3] == d);
case 2: REPORTER_ASSERT(r, vals[0] == a && vals[1] == b);
}
+ switch (N) {
+ case 8: REPORTER_ASSERT(r, v.template kth<4>() == e && v.template kth<5>() == f &&
+ v.template kth<6>() == g && v.template kth<7>() == h);
+ case 4: REPORTER_ASSERT(r, v.template kth<2>() == c && v.template kth<3>() == d);
+ case 2: REPORTER_ASSERT(r, v.template kth<0>() == a && v.template kth<1>() == b);
+ }
};
T vals[] = { 1,2,3,4,5,6,7,8 };
@@ -117,4 +123,8 @@ DEF_TEST(SkNi, r) {
test_Ni<2, uint16_t>(r);
test_Ni<4, uint16_t>(r);
test_Ni<8, uint16_t>(r);
+
+ test_Ni<2, int>(r);
+ test_Ni<4, int>(r);
+ test_Ni<8, int>(r);
}
« no previous file with comments | « src/opts/SkNx_sse.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698