Chromium Code Reviews| Index: tests/SkpSkGrTest.cpp |
| diff --git a/tests/SkpSkGrTest.cpp b/tests/SkpSkGrTest.cpp |
| index 1f0529e016053ec6d61194472d694d70c828f4ce..8a130acf3e18493238e6e861b87135642088680d 100755 |
| --- a/tests/SkpSkGrTest.cpp |
| +++ b/tests/SkpSkGrTest.cpp |
| @@ -26,6 +26,7 @@ |
| #include "SkThreadPool.h" |
| #include "SkTime.h" |
| #include "Test.h" |
| +#include "TestClassDef.h" |
| #ifdef SK_BUILD_FOR_WIN |
| #define PATH_SLASH "\\" |
| @@ -36,7 +37,7 @@ |
| #define PATH_SLASH "/" |
| #define IN_DIR "/usr/local/google/home/caryclark" PATH_SLASH "9-30-13-skp" |
| #define OUT_DIR "/media/01CD75512A7F9EE0/4" PATH_SLASH |
| - #define LINE_FEED \n" |
| + #define LINE_FEED "\n" |
| #endif |
| #define PATH_STR_SIZE 512 |
| @@ -48,7 +49,7 @@ static const struct { |
| {1, "http___accuweather_com_.skp"}, // Couldn't convert bitmap to texture.http___absoku072_com_ |
| }; |
| -static const size_t skipOverSkGrCount = 0; // SK_ARRAY_COUNT(skipOverSkGr); |
| +// static const size_t skipOverSkGrCount = 0; // SK_ARRAY_COUNT(skipOverSkGr); |
|
mtklein
2014/01/02 17:51:07
Let's revert everything related to this. It looks
tfarina
2014/01/02 21:09:08
Done.
|
| ///////////////////////////////////////// |
| @@ -514,7 +515,7 @@ public: |
| SkASSERT(i < kMaxLength); |
| } while (true); |
| do { |
| - SkAssertResult(reader.read(&c, 1) != 0); |
| + //SkAssertResult(reader.read(&c, 1) != 0); |
|
mtklein
2014/01/02 17:51:07
This is not a no-op. SkAssertResult always evalua
tfarina
2014/01/02 21:09:08
Done.
tfarina
2014/01/02 21:09:08
Done.
|
| if (c == ' ') { |
| break; |
| } |
| @@ -572,7 +573,7 @@ static bool initTest() { |
| return make_out_dirs(); |
| } |
| -static void SkpSkGrTest(skiatest::Reporter* reporter) { |
| +DEF_TEST(SkpSkGr, reporter) { |
| SkTArray<TestResult, true> errors; |
| if (!initTest()) { |
| return; |
| @@ -592,12 +593,12 @@ static void SkpSkGrTest(skiatest::Reporter* reporter) { |
| PreParser preParser(dirNo); |
| SkFILEWStream statusStream(makeStatusString(dirNo).c_str()); |
| while (iter.next(&filename)) { |
| - for (size_t index = 0; index < skipOverSkGrCount; ++index) { |
| - if (skipOverSkGr[index].directory == dirNo |
| - && strcmp(filename.c_str(), skipOverSkGr[index].filename) == 0) { |
| - goto skipOver; |
| - } |
| - } |
| +// for (size_t index = 0; index < skipOverSkGrCount; ++index) { |
| +// if (skipOverSkGr[index].directory == dirNo |
| +// && strcmp(filename.c_str(), skipOverSkGr[index].filename) == 0) { |
| +// goto skipOver; |
| +// } |
| +// } |
| if (preParser.match(filename, &statusStream, &state.fResult)) { |
| addError(&state); |
| ++testCount; |
| @@ -628,8 +629,8 @@ static void SkpSkGrTest(skiatest::Reporter* reporter) { |
| SkDebugf("#%d\n", testCount); |
| } |
| } |
| - skipOver: |
| - reporter->bumpTestCount(); |
| +// skipOver: |
| +// reporter->bumpTestCount(); |
| checkEarlyExit: |
| if (1 && testCount == 20) { |
| break; |
| @@ -669,7 +670,7 @@ static void testSkGrMain(SkpSkGrThreadState* data) { |
| data->fReporter->bumpTestCount(); |
| } |
| -static void SkpSkGrThreadedTest(skiatest::Reporter* reporter) { |
| +DEF_TEST(SkpSkGrThreaded, reporter) { |
| if (!initTest()) { |
| return; |
| } |
| @@ -690,17 +691,17 @@ static void SkpSkGrThreadedTest(skiatest::Reporter* reporter) { |
| bumpCount(reporter, true); |
| continue; |
| } |
| - for (size_t index = 0; index < skipOverSkGrCount; ++index) { |
| - if (skipOverSkGr[index].directory == dirIndex |
| - && strcmp(filename.c_str(), skipOverSkGr[index].filename) == 0) { |
| - bumpCount(reporter, true); |
| - goto skipOver; |
| - } |
| - } |
| +// for (size_t index = 0; index < skipoverskgrcount; ++index) { |
| +// if (skipoverskgr[index].directory == dirindex |
| +// && strcmp(filename.c_str(), skipoverskgr[index].filename) == 0) { |
| +// bumpcount(reporter, true); |
| +// goto skipover; |
| +// } |
| +// } |
| *testRunner.fRunnables.append() = SkNEW_ARGS(SkpSkGrThreadedRunnable, |
| (&testSkGrMain, dirIndex, filename.c_str(), &testRunner)); |
| - skipOver: |
| - ; |
| +// skipOver: |
| +// ; |
| } |
| } |
| testRunner.render(); |
| @@ -736,7 +737,7 @@ static void SkpSkGrThreadedTest(skiatest::Reporter* reporter) { |
| } |
| } |
| -static void SkpSkGrOneOffTest(skiatest::Reporter* reporter) { |
| +DEF_TEST(SkpSkGrOneOff, reporter) { |
| if (!initTest()) { |
| return; |
| } |
| @@ -750,10 +751,3 @@ static void SkpSkGrOneOffTest(skiatest::Reporter* reporter) { |
| TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose()); |
| TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose()); |
| } |
| - |
| -#include "TestClassDef.h" |
| -DEFINE_TESTCLASS_SHORT(SkpSkGrTest) |
| - |
| -DEFINE_TESTCLASS_SHORT(SkpSkGrOneOffTest) |
| - |
| -DEFINE_TESTCLASS_SHORT(SkpSkGrThreadedTest) |