From 31a5cf9c34f271e00ac278ee00ec013a1acd46c8 Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Thu, 31 Mar 2016 10:35:03 +0100 Subject: [PATCH] Also `exit(1)` on test failure. --- "frameworks\\utest/source/harness.cpp" | 2 ++ 1 file changed, 2 insertions(+) diff --git "a/frameworks\\utest/source/harness.cpp" "b/frameworks\\utest/source/harness.cpp" index 48bb12c750..85fe5a9f82 100644 --- "a/frameworks\\utest/source/harness.cpp" +++ "b/frameworks\\utest/source/harness.cpp" @@ -91,6 +91,7 @@ bool Harness::run(const Specification& specification, std::size_t start_case) if (handlers.test_failure) handlers.test_failure(failure_t(REASON_TEST_SETUP, location)); if (handlers.test_teardown) handlers.test_teardown(0, 0, failure_t(REASON_TEST_SETUP, location)); test_cases = NULL; + exit(1); return true; } @@ -135,6 +136,7 @@ void Harness::raise_failure(const failure_reason_t reason) failure_t fail(reason, location); location = LOCATION_TEST_TEARDOWN; if (handlers.test_teardown) handlers.test_teardown(test_passed, test_failed, fail); + exit(test_failed); die(); } }