Index: tests/PMFloatTest.cpp |
diff --git a/tests/PMFloatTest.cpp b/tests/PMFloatTest.cpp |
index 0f0d853c2b840d8abacd74e2a6da6edc1b4adf4b..309cd60f4ac8537dfec35624b3004312a4821251 100644 |
--- a/tests/PMFloatTest.cpp |
+++ b/tests/PMFloatTest.cpp |
@@ -22,6 +22,9 @@ DEF_TEST(SkPMFloat, r) { |
pmf = SkPMFloat(254.5f, 203.5f, 153.1f, 50.8f); |
REPORTER_ASSERT(r, c == pmf.get()); |
+ pmf = SkPMFloat(255.9f, 204.01f, 153.0f, -0.9f); |
+ REPORTER_ASSERT(r, SkPreMultiplyColor(0xFFCC9900) == pmf.trunc()); |
+ |
// Test clamping. |
SkPMFloat clamped(SkPMFloat(510.0f, 153.0f, 1.0f, -0.2f).clamped()); |
REPORTER_ASSERT(r, SkScalarNearlyEqual(255.0f, clamped.a())); |