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.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'framework/Framework.cpp') diff --git a/framework/Framework.cpp b/framework/Framework.cpp index 343168426c..f2ecff98f4 100644 --- a/framework/Framework.cpp +++ b/framework/Framework.cpp @@ -127,6 +127,31 @@ void Framework::pop_suite() _test_suite_name.pop_back(); } +void Framework::add_test_info(std::string info) +{ + _test_info.emplace_back(std::move(info)); +} + +void Framework::clear_test_info() +{ + _test_info.clear(); +} + +bool Framework::has_test_info() const +{ + return !_test_info.empty(); +} + +void Framework::print_test_info(std::ostream &os) const +{ + os << "CONTEXT:\n"; + + for(const auto &str : _test_info) + { + os << " " << str << "\n"; + } +} + void Framework::log_test_start(const std::string &test_name) { if(_printer != nullptr) -- cgit v1.2.1