Skip to content

Commit 5f24abe

Browse files
committed
Fix returning false from TEST macro
1 parent 6c890c1 commit 5f24abe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/boostLocale/test/unit_test.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
3-
// Copyright (c) 2021-2022 Alexander Grund
3+
// Copyright (c) 2021-2025 Alexander Grund
44
// Copyright (c) 2002, 2009, 2014 Peter Dimov
55
//
66
// Distributed under the Boost Software License, Version 1.0.
@@ -95,7 +95,8 @@ namespace boost { namespace locale { namespace test {
9595
boost::locale::test::results().test_counter++;
9696
if(!v) {
9797
boost::locale::test::report_error(expr, file, line);
98-
throw std::runtime_error("Critical test " + std::string(expr) + " failed");
98+
if(require)
99+
throw std::runtime_error("Critical test " + std::string(expr) + " failed");
99100
}
100101
return v;
101102
}

0 commit comments

Comments
 (0)