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

Unified Diff: tests/PaintTest.cpp

Issue 204543002: Revert of SkPaint: eliminate some dead bytes in 64-bit build. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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/SkPaint.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PaintTest.cpp
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index f28dbe40e1661ce76c64db9400b4f429e757cd6f..e7954b913685aefa3b946a1e3e82d3a304e155db 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -59,11 +59,7 @@
return count;
}
-DEF_TEST(Paint_cmap, reporter) {
- // need to implement charsToGlyphs on other backends (e.g. linux, win)
- // before we can run this tests everywhere
- return;
-
+static void test_cmap(skiatest::Reporter* reporter) {
static const int NGLYPHS = 64;
SkUnichar src[NGLYPHS];
@@ -117,7 +113,7 @@
}
// temparary api for bicubic, just be sure we can set/clear it
-DEF_TEST(Paint_filterlevel, reporter) {
+static void test_filterlevel(skiatest::Reporter* reporter) {
SkPaint p0, p1;
REPORTER_ASSERT(reporter,
@@ -141,7 +137,7 @@
}
}
-DEF_TEST(Paint_copy, reporter) {
+static void test_copy(skiatest::Reporter* reporter) {
SkPaint paint;
// set a few member variables
paint.setStyle(SkPaint::kStrokeAndFill_Style);
@@ -196,7 +192,7 @@
// found and fixed for webkit: mishandling when we hit recursion limit on
// mostly degenerate cubic flatness test
-DEF_TEST(Paint_regression_cubic, reporter) {
+static void regression_cubic(skiatest::Reporter* reporter) {
SkPath path, stroke;
SkPaint paint;
@@ -229,7 +225,7 @@
}
// found and fixed for android: not initializing rect for string's of length 0
-DEF_TEST(Paint_regression_measureText, reporter) {
+static void regression_measureText(skiatest::Reporter* reporter) {
SkPaint paint;
paint.setTextSize(12.0f);
@@ -240,6 +236,23 @@
// test that the rect was reset
paint.measureText("", 0, &r, 1.0f);
REPORTER_ASSERT(reporter, r.isEmpty());
+}
+
+DEF_TEST(Paint, reporter) {
+ // TODO add general paint tests
+ test_copy(reporter);
+
+ // regression tests
+ regression_cubic(reporter);
+ regression_measureText(reporter);
+
+ test_filterlevel(reporter);
+
+ // need to implement charsToGlyphs on other backends (e.g. linux, win)
+ // before we can run this tests everywhere
+ if (false) {
+ test_cmap(reporter);
+ }
}
#define ASSERT(expr) REPORTER_ASSERT(r, expr)
« no previous file with comments | « src/core/SkPaint.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698