aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PaintTest.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-19 14:36:29 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-19 14:36:29 +0000
commitfffb2cd4639076b799a68cc0d1fc04d376b1ac3d (patch)
treeafe15686b6e658d7d34512449a589e201d1761ff /tests/PaintTest.cpp
parent2aae29832adcc322e5671199863f8e5f7edf33e7 (diff)
Revert of SkPaint: eliminate some dead bytes in 64-bit build. (https://codereview.chromium.org/203203003/)
Reason for revert: Causing RunTest failures on Android. Original issue's description: > SkPaint: eliminate some dead bytes in 64-bit build. > > + memcpy-based copy constructor was hiding this gap -> manual copy constructor. > + Split tests for finer-grained failures. > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=13856 R=reed@google.com, mtklein@google.com, mtklein@chromium.org TBR=mtklein@chromium.org, mtklein@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/204543002 git-svn-id: http://skia.googlecode.com/svn/trunk@13858 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PaintTest.cpp')
-rw-r--r--tests/PaintTest.cpp31
1 files changed, 22 insertions, 9 deletions
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index f28dbe40e1..e7954b9136 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -59,11 +59,7 @@ static int find_first_zero(const uint16_t glyphs[], int count) {
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 @@ DEF_TEST(Paint_cmap, reporter) {
}
// 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_filterlevel, reporter) {
}
}
-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 @@ DEF_TEST(Paint_copy, reporter) {
// 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 @@ DEF_TEST(Paint_regression_cubic, reporter) {
}
// 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);
@@ -242,6 +238,23 @@ DEF_TEST(Paint_regression_measureText, reporter) {
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)
DEF_TEST(Paint_FlatteningTraits, r) {