From c7d1503008e74496836f99d64c082d4c9ae8f1ca Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Tue, 18 Jul 2017 16:21:16 +0100 Subject: COMPMID-415: Build new validation Change-Id: I7409693f40ba3941b9d90f28c5d292c376e185c5 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80939 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- framework/Framework.h | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'framework/Framework.h') diff --git a/framework/Framework.h b/framework/Framework.h index bdaf806e21..4f60fed721 100644 --- a/framework/Framework.h +++ b/framework/Framework.h @@ -127,6 +127,27 @@ public: template void add_data_test_case(std::string test_name, DatasetMode mode, std::string description, D &&data); + /** Add info string for the next expectation/assertion. + * + * @param[in] info Info string. + */ + void add_test_info(std::string info); + + /** Clear the collected test info. */ + void clear_test_info(); + + /** Check if any info has been registered. + * + * @return True if there is test info. + */ + bool has_test_info() const; + + /** Print test info. + * + * @param[out] os Output stream. + */ + void print_test_info(std::ostream &os) const; + /** Tell the framework that execution of a test starts. * * @param[in] test_name Name of the started test case. @@ -257,11 +278,12 @@ private: using create_function = std::unique_ptr(); std::map _available_instruments{}; - InstrumentType _instruments{ InstrumentType::NONE }; - std::regex _test_name_filter{ ".*" }; - int64_t _test_id_filter{ -1 }; - DatasetMode _dataset_mode{ DatasetMode::ALL }; - TestResult *_current_test_result{ nullptr }; + InstrumentType _instruments{ InstrumentType::NONE }; + std::regex _test_name_filter{ ".*" }; + int64_t _test_id_filter{ -1 }; + DatasetMode _dataset_mode{ DatasetMode::ALL }; + TestResult *_current_test_result{ nullptr }; + std::vector _test_info{}; }; template -- cgit v1.2.1