add simplify to json tests
pathops_unittest -J dump.json
now generates both Op() and Simplify() tests and results.
Also, make json names unique. While this may not be necessary,
duplicate names may make debugging failing tests more difficult.
R=kjlubick@google.com
Bug: skia:
Change-Id: I2eed5a8141764a0ad993fb9a09c23b7d90d65048
Reviewed-on: https://skia-review.googlesource.com/146100
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/tests/PathOpsTigerTest.cpp b/tests/PathOpsTigerTest.cpp
index e8b21af..bf9ebd6 100644
--- a/tests/PathOpsTigerTest.cpp
+++ b/tests/PathOpsTigerTest.cpp
@@ -4,6 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#include "PathOpsDebug.h"
#include "PathOpsExtendedTest.h"
#include "PathOpsThreadedCommon.h"
@@ -132,6 +133,8 @@
testSimplify(reporter, path, filename);
}
+int gTigerTests = 0;
+
static void tiger8a_x(skiatest::Reporter* reporter, uint64_t testlines) {
SkPath path;
uint64_t i = 0;
@@ -172,7 +175,9 @@
if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f6b333), SkBits2Float(0x4360e666)); // 493.4f, 224.9f
if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f639c5), SkBits2Float(0x4361375a)); // 492.451f, 225.216f
if (testlines & (1LL << i++)) path.close();
-testSimplify(reporter, path, "tiger");
+SkString testName;
+testName.printf("tiger8a_x%d", ++gTigerTests);
+testSimplify(reporter, path, testName.c_str());
}
#include "SkRandom.h"
@@ -223,7 +228,9 @@
if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f84300), SkBits2Float(0x435b88fd), SkBits2Float(0x43f7b75b), SkBits2Float(0x435c5e8e)); // 496.523f, 219.535f, 495.432f, 220.369f
if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f6b984), SkBits2Float(0x435de2c4), SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 493.449f, 221.886f, 494.349f, 224.584f
if (testlines & (1LL << i++)) path.close();
-testSimplify(reporter, path, "tiger");
+SkString testName;
+testName.printf("tiger8b_x%d", ++gTigerTests);
+testSimplify(reporter, path, testName.c_str());
}
static void testTiger(PathOpsThreadState* data) {