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

Unified Diff: runtime/bin/run_vm_tests.cc

Issue 2675553002: Removed instances of fprintf in run_vm_tests and replaced them with OS::Print/PrintErr. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/run_vm_tests.cc
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index 8d49fe077baff3d1feec009fd5d437758e65f3ea..784ee990d337c1998d216e05f76324f279e288b6 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -35,16 +35,16 @@ static int run_matches = 0;
void TestCase::Run() {
- fprintf(stdout, "Running test: %s\n", name());
+ OS::Print("Running test: %s\n", name());
(*run_)();
- fprintf(stdout, "Done: %s\n", name());
+ OS::Print("Done: %s\n", name());
}
void RawTestCase::Run() {
- fprintf(stdout, "Running test: %s\n", name());
+ OS::Print("Running test: %s\n", name());
(*run_)();
- fprintf(stdout, "Done: %s\n", name());
+ OS::Print("Done: %s\n", name());
}
@@ -53,7 +53,7 @@ void TestCaseBase::RunTest() {
this->Run();
run_matches++;
} else if (run_filter == kList) {
- fprintf(stdout, "%s\n", this->name());
+ OS::Print("%s\n", this->name());
run_matches++;
}
}
@@ -67,18 +67,18 @@ void Benchmark::RunBenchmark() {
this->score());
run_matches++;
} else if (run_filter == kList) {
- fprintf(stdout, "%s\n", this->name());
+ OS::Print("%s\n", this->name());
run_matches++;
}
}
static void PrintUsage() {
- fprintf(stderr,
- "run_vm_tests [--list | --benchmarks | "
- "<test name> | <benchmark name>]\n");
- fprintf(stderr, "run_vm_tests [vm-flags ...] <test name>\n");
- fprintf(stderr, "run_vm_tests [vm-flags ...] <benchmark name>\n");
+ OS::PrintErr(
+ "run_vm_tests [--list | --benchmarks | "
+ "<test name> | <benchmark name>]\n");
+ OS::PrintErr("run_vm_tests [vm-flags ...] <test name>\n");
+ OS::PrintErr("run_vm_tests [vm-flags ...] <benchmark name>\n");
}
@@ -133,7 +133,7 @@ static int Main(int argc, const char** argv) {
TestCaseBase::RunAllRaw();
// Print a warning message if no tests or benchmarks were matched.
if (run_matches == 0) {
- fprintf(stderr, "No tests matched: %s\n", run_filter);
+ OS::PrintErr("No tests matched: %s\n", run_filter);
return 1;
}
if (DynamicAssertionHelper::failed()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698