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

Unified Diff: tests/PMFloatTest.cpp

Issue 952453004: Revert of Sketch SkPMFloat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/SkPMFloat_none.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PMFloatTest.cpp
diff --git a/tests/PMFloatTest.cpp b/tests/PMFloatTest.cpp
deleted file mode 100644
index 94cd663a5331d5f1a4a8ee3644329491e2647291..0000000000000000000000000000000000000000
--- a/tests/PMFloatTest.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "SkPMFloat.h"
-#include "Test.h"
-
-DEF_TEST(SkPMFloat, r) {
- SkPMColor c = SkPreMultiplyColor(0xFFCC9933);
-
- SkPMFloat pmf;
- pmf.set(c);
- REPORTER_ASSERT(r, SkScalarNearlyEqual(1.0f, pmf.a()));
- REPORTER_ASSERT(r, SkScalarNearlyEqual(0.8f, pmf.r()));
- REPORTER_ASSERT(r, SkScalarNearlyEqual(0.6f, pmf.g()));
- REPORTER_ASSERT(r, SkScalarNearlyEqual(0.2f, pmf.b()));
-
- REPORTER_ASSERT(r, c == pmf.get());
-
- SkPMFloat unclamped;
- unclamped.setA(+2.0f);
- unclamped.setR(+0.2f);
- unclamped.setG(-0.2f);
- unclamped.setB(-5.0f);
-
- SkPMFloat clamped;
- clamped.set(unclamped.clamped());
-
- REPORTER_ASSERT(r, SkScalarNearlyEqual(1.0f, clamped.a()));
- REPORTER_ASSERT(r, SkScalarNearlyEqual(0.2f, clamped.r()));
- REPORTER_ASSERT(r, SkScalarNearlyEqual(0.0f, clamped.g()));
- REPORTER_ASSERT(r, SkScalarNearlyEqual(0.0f, clamped.b()));
-}
« no previous file with comments | « src/opts/SkPMFloat_none.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698