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

Unified Diff: tests/ColorSpaceTest.cpp

Issue 2306313002: Revert of Delete SkColorSpace::kUnknown_Named, remove fNamed field (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 3 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/core/SkColorSpace_Base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « src/core/SkColorSpace_Base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698