Index: tests/SkNxTest.cpp |
diff --git a/tests/SkNxTest.cpp b/tests/SkNxTest.cpp |
index 754e9800b12963bbebf04de4239f985426cc8502..fcd113d44dfcdd4674fa3f0c120e461176bcd649 100644 |
--- a/tests/SkNxTest.cpp |
+++ b/tests/SkNxTest.cpp |
@@ -216,3 +216,11 @@ DEF_TEST(SkNx_cast, r) { |
REPORTER_ASSERT(r, is.kth<2>() == 0); |
REPORTER_ASSERT(r, is.kth<3>() == 1); |
} |
+ |
+DEF_TEST(SkNx_abs, r) { |
+ auto fs = Sk4f(0.0f, -0.0f, 2.0f, -4.0f).abs(); |
+ REPORTER_ASSERT(r, fs.kth<0>() == 0.0f); |
+ REPORTER_ASSERT(r, fs.kth<1>() == 0.0f); |
+ REPORTER_ASSERT(r, fs.kth<2>() == 2.0f); |
+ REPORTER_ASSERT(r, fs.kth<3>() == 4.0f); |
+} |