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

Unified Diff: tests/Test.cpp

Issue 14267022: Make it clearer what's going on at the end of tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Also make --matched make more sense. Created 7 years, 8 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 | « tests/Test.h ('k') | tests/skia_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Test.cpp
diff --git a/tests/Test.cpp b/tests/Test.cpp
index 408e14f6917479c2dd07a472fdd6b47751430922..81c4ef980787d4d346115789b0f36b261fbe66cb 100644
--- a/tests/Test.cpp
+++ b/tests/Test.cpp
@@ -9,6 +9,7 @@
#include "SkString.h"
#include "SkTArray.h"
+#include "SkTime.h"
#if SK_SUPPORT_GPU
#include "GrContext.h"
@@ -80,11 +81,13 @@ void Test::run() {
// Tell (likely shared) fReporter that this test has started.
fReporter->startTest(this);
+ const SkMSec start = SkTime::GetMSecs();
// Run the test into a LocalReporter so we know if it's passed or failed without interference
// from other tests that might share fReporter.
LocalReporter local;
this->onRun(&local);
fPassed = local.failure_size() == 0;
+ fElapsed = SkTime::GetMSecs() - start;
// Now tell fReporter about any failures and wrap up.
for (int i = 0; i < local.failure_size(); i++) {
« no previous file with comments | « tests/Test.h ('k') | tests/skia_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698