diff options
Diffstat (limited to 'libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp')
-rw-r--r-- | libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp index cadbc2cc200..f23bef36ec1 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp @@ -21,18 +21,20 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { for (std::regex_constants::syntax_option_type op : {std::regex::ECMAScript, std::regex::extended, std::regex::egrep, std::regex::awk}) { try { - std::regex_match( + bool b = std::regex_match( "aaaaaaaaaaaaaaaaaaaa", std::regex( "a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaa", op)); - assert(false); + LIBCPP_ASSERT(false); + assert(b); } catch (const std::regex_error &e) { assert(e.code() == std::regex_constants::error_complexity); } |