Collect test fail reasons in case of nested assertions 92/29792/9
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tue, 4 Nov 2014 10:36:07 +0000 (11:36 +0100)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Sat, 6 Dec 2014 01:03:24 +0000 (02:03 +0100)
commit24e10136bf1dc3de8e55f27888416fc0d9b6078b
tree1719c992e3b3801637274330fd80f564c0356f20
parenta0896f6616079ab3120e4a251666096efaa5108c
Collect test fail reasons in case of nested assertions

RUNNER_ASSERT_MSG macro (and related) throw DPL::Test::TestRunner::TestFailed
exception. If such an exception is thrown during clean-up caused by another
exception and test interruption, termination of tests program happen leaving
no clues about termination cause.

This patch checks if an exception has been thrown earlier and if so,
it doesn't throw next exception but passes exception message to TestRunner.
All such messages passed with addFailReason() method are gathered inside
TestRunner and used during ResultCollection after finishing test and passing
results to collectors.

This patch introduces simple concatrenation method of joining all fail
reasons into single string, that is passed to Collectors.
When collectors API will be ready to receive multiple reasons of single test
failure, another patch can simply pass whole fail results queue.

Change-Id: I1bf582da6526a4187e7c4a53afaeea976cf4bda1
README
tests/framework/include/dpl/test/test_runner.h
tests/framework/src/test_runner.cpp