Index: tests/ColorSpaceTest.cpp |
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp |
index b59b6cc0cc4d66c63c033a7dc22a2f0927eb8fe8..3eb145b2e8b0e104a18c325f03d9f39a857a0157 100644 |
--- a/tests/ColorSpaceTest.cpp |
+++ b/tests/ColorSpaceTest.cpp |
@@ -149,15 +149,17 @@ |
DEF_TEST(ColorSpace_Named, r) { |
const struct { |
SkColorSpace::Named fNamed; |
+ bool fExpectedToSucceed; |
bool fIsSRGB; |
} recs[] { |
- { SkColorSpace::kSRGB_Named, true }, |
- { SkColorSpace::kAdobeRGB_Named, false }, |
+ { SkColorSpace::kUnknown_Named, false, false }, |
+ { SkColorSpace::kSRGB_Named, true, true }, |
+ { SkColorSpace::kAdobeRGB_Named, true, false }, |
}; |
for (auto rec : recs) { |
auto cs = SkColorSpace::NewNamed(rec.fNamed); |
- REPORTER_ASSERT(r, cs); |
+ REPORTER_ASSERT(r, !cs == !rec.fExpectedToSucceed); |
if (cs) { |
if (rec.fIsSRGB) { |
REPORTER_ASSERT(r, SkColorSpace::kSRGB_GammaNamed == cs->gammaNamed()); |