Commit e45252e6 by Eric Fiselier

move ConsoleReporter out of internal namespace

parent d7166022
...@@ -78,12 +78,6 @@ class BenchmarkReporter { ...@@ -78,12 +78,6 @@ class BenchmarkReporter {
virtual ~BenchmarkReporter(); virtual ~BenchmarkReporter();
}; };
namespace internal {
// ------------------------------------------------------
// Internal implementation details follow; please ignore
// Simple reporter that outputs benchmark data to the console. This is the // Simple reporter that outputs benchmark data to the console. This is the
// default reporter used by RunSpecifiedBenchmarks(). // default reporter used by RunSpecifiedBenchmarks().
class ConsoleReporter : public BenchmarkReporter { class ConsoleReporter : public BenchmarkReporter {
...@@ -96,6 +90,5 @@ class ConsoleReporter : public BenchmarkReporter { ...@@ -96,6 +90,5 @@ class ConsoleReporter : public BenchmarkReporter {
mutable size_t name_field_width_; mutable size_t name_field_width_;
}; };
} // end namespace internal
} // end namespace benchmark } // end namespace benchmark
#endif // BENCHMARK_REPORTER_H_ #endif // BENCHMARK_REPORTER_H_
...@@ -817,7 +817,7 @@ void RunSpecifiedBenchmarks(const BenchmarkReporter* reporter) { ...@@ -817,7 +817,7 @@ void RunSpecifiedBenchmarks(const BenchmarkReporter* reporter) {
std::string spec = FLAGS_benchmark_filter; std::string spec = FLAGS_benchmark_filter;
if (spec.empty() || spec == "all") if (spec.empty() || spec == "all")
spec = "."; // Regexp that matches all benchmarks spec = "."; // Regexp that matches all benchmarks
internal::ConsoleReporter default_reporter; ConsoleReporter default_reporter;
internal::RunMatchingBenchmarks(spec, reporter ? reporter : &default_reporter); internal::RunMatchingBenchmarks(spec, reporter ? reporter : &default_reporter);
} }
......
...@@ -88,9 +88,6 @@ void ComputeStats(const std::vector<BenchmarkReporter::Run>& reports, ...@@ -88,9 +88,6 @@ void ComputeStats(const std::vector<BenchmarkReporter::Run>& reports,
BenchmarkReporter::~BenchmarkReporter() {} BenchmarkReporter::~BenchmarkReporter() {}
namespace internal {
bool ConsoleReporter::ReportContext(const Context& context) const { bool ConsoleReporter::ReportContext(const Context& context) const {
name_field_width_ = context.name_field_width; name_field_width_ = context.name_field_width;
...@@ -189,6 +186,4 @@ void ConsoleReporter::PrintRunData(const Run& result) const { ...@@ -189,6 +186,4 @@ void ConsoleReporter::PrintRunData(const Run& result) const {
result.report_label.c_str()); result.report_label.c_str());
} }
} // end namespace internal
} // end namespace benchmark } // end namespace benchmark
...@@ -21,7 +21,7 @@ double CalculatePi(int depth) { ...@@ -21,7 +21,7 @@ double CalculatePi(int depth) {
return (pi - 1.0) * 4; return (pi - 1.0) * 4;
} }
class TestReporter : public benchmark::internal::ConsoleReporter { class TestReporter : public benchmark::ConsoleReporter {
public: public:
virtual bool ReportContext(const Context& context) const { virtual bool ReportContext(const Context& context) const {
return ConsoleReporter::ReportContext(context); return ConsoleReporter::ReportContext(context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment