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

Unified Diff: tests/SkNxTest.cpp

Issue 1685773002: Sk4f: add floor() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add a bench Created 4 years, 10 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 13e0a9f61fba5ba83327beaebcc52de1a464cd30..e329e17bfad8e259c42a3abf26365f8104f30239 100644
--- a/tests/SkNxTest.cpp
+++ b/tests/SkNxTest.cpp
@@ -215,6 +215,14 @@ DEF_TEST(SkNx_abs, r) {
REPORTER_ASSERT(r, fs.kth<3>() == 4.0f);
}
+DEF_TEST(SkNx_floor, r) {
+ auto fs = Sk4f(0.4f, -0.4f, 0.6f, -0.6f).floor();
+ REPORTER_ASSERT(r, fs.kth<0>() == 0.0f);
+ REPORTER_ASSERT(r, fs.kth<1>() == -1.0f);
+ REPORTER_ASSERT(r, fs.kth<2>() == 0.0f);
+ REPORTER_ASSERT(r, fs.kth<3>() == -1.0f);
+}
+
DEF_TEST(SkNx_shuffle, r) {
Sk4f f4(0,10,20,30);
« 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