diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-04-09 04:06:54 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-04-09 04:06:54 +0000 |
commit | eeb3b7ff9813600b6cab662e1a0174ee2e279cac (patch) | |
tree | b73999385100a1b6cdf2a48d2f3a982f43cf9a20 /tests/Test.cpp | |
parent | c4d409012c2691d19f71c3b3f3369e4cd238fdfd (diff) |
support -android mode when running tests, which spews out android specific
formatting for their testing env.
git-svn-id: http://skia.googlecode.com/svn/trunk@152 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/Test.cpp')
-rw-r--r-- | tests/Test.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/Test.cpp b/tests/Test.cpp index 5b8d439e2f..2de0183b98 100644 --- a/tests/Test.cpp +++ b/tests/Test.cpp @@ -17,6 +17,7 @@ void Reporter::startTest(Test* test) { fCurrTest = test; this->onStart(test); fTestCount += 1; + fCurrTestSuccess = true; // we're optimistic } void Reporter::report(const char desc[], Result result) { @@ -25,6 +26,9 @@ void Reporter::report(const char desc[], Result result) { } this->onReport(desc, result); fResultCount[result] += 1; + if (kFailed == result) { + fCurrTestSuccess = false; + } } void Reporter::endTest(Test* test) { @@ -52,9 +56,10 @@ const char* Test::getName() { return fName.c_str(); } -void Test::run() { +bool Test::run() { fReporter->startTest(this); this->onRun(fReporter); fReporter->endTest(this); + return fReporter->getCurrSuccess(); } |