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

Unified Diff: tests/SRGBTest.cpp

Issue 2164843002: We have some work to do. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SRGBTest.cpp
diff --git a/tests/SRGBTest.cpp b/tests/SRGBTest.cpp
index 65bfc59b427fd07d8135ca28bc16b5459ea7201b..59088f2c1689dbeb4f62d23b6b51b46ddc087e6a 100644
--- a/tests/SRGBTest.cpp
+++ b/tests/SRGBTest.cpp
@@ -20,6 +20,17 @@ DEF_TEST(sk_linear_to_srgb, r) {
REPORTER_ASSERT(r, 0 == linear_to_srgb(0.0f));
REPORTER_ASSERT(r, 255 == linear_to_srgb(1.0f));
+ int n = 0;
+ for (int i = 0; i < 256; i++) {
+ int actual = linear_to_srgb(sk_linear_from_srgb[i]);
+ if (actual != i) {
+ printf("%d -> %d\n", i, actual);
+ n++;
+ }
+ }
+ printf("n = %d\n", n);
+ return;
+
// Should be monotonic between 0 and 1.
// We don't bother checking denorm values.
int tolerated_regressions = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698