diff options
Diffstat (limited to 'framework/Framework.h')
-rw-r--r-- | framework/Framework.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/framework/Framework.h b/framework/Framework.h index fbc95badd6..fbb6b9c04c 100644 --- a/framework/Framework.h +++ b/framework/Framework.h @@ -30,6 +30,7 @@ #include "TestResult.h" #include "Utils.h" #include "instruments/Instruments.h" +#include "printers/Printer.h" #include <algorithm> #include <chrono> @@ -190,6 +191,15 @@ public: */ void set_test_result(std::string test_case_name, TestResult result); + /** Use the specified printer to output test results from the last run. + * + * This method can be used if the test results need to be obtained using a + * different printer than the one managed by the framework. + * + * @param[in] printer Printer used to output results. + */ + void print_test_results(Printer &printer) const; + /** Factory method to obtain a configured profiler. * * The profiler enables all instruments that have been passed to the @ref @@ -199,6 +209,12 @@ public: */ Profiler get_profiler() const; + /** Set the printer used for the output of test results. + * + * @param[in] printer Pointer to a printer. + */ + void set_printer(Printer *printer); + /** List of @ref TestId's. * * @return Vector with all test ids. @@ -231,6 +247,7 @@ private: std::chrono::seconds _runtime{ 0 }; int _num_iterations{ 1 }; bool _throw_errors{ false }; + Printer *_printer{ nullptr }; using create_function = std::unique_ptr<Instrument>(); std::map<InstrumentType, create_function *> _available_instruments{}; |