diff options
Diffstat (limited to 'test/std/re/re.regex')
28 files changed, 35 insertions, 7 deletions
diff --git a/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp index 96cadf166001b..39c3a22ef7257 100644 --- a/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp @@ -17,6 +17,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.assign/assign.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign.pass.cpp index 9c5f834b9452a..97208c68c8d6c 100644 --- a/test/std/re/re.regex/re.regex.assign/assign.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/assign.pass.cpp @@ -16,6 +16,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { @@ -25,7 +26,7 @@ int main() assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); assert(std::regex_search("ab", r2)); - + bool caught = false; try { r2.assign("(def", std::regex::extended); } catch(std::regex_error &) { caught = true; } diff --git a/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp index 529a64a239a0e..7cd4845f30733 100644 --- a/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp @@ -19,6 +19,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" #include "test_iterators.h" int main() diff --git a/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp index dd39dee13ffbe..33b9cad18335a 100644 --- a/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp index 679cd9df17fce..7ec4f77a50529 100644 --- a/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp index 46f984da04db6..247d27721be77 100644 --- a/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp @@ -17,6 +17,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.assign/copy.pass.cpp b/test/std/re/re.regex/re.regex.assign/copy.pass.cpp index 2a616ff012c1d..3f212f772a38b 100644 --- a/test/std/re/re.regex/re.regex.assign/copy.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/copy.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.assign/il.pass.cpp b/test/std/re/re.regex/re.regex.assign/il.pass.cpp index a9d8ada4ff0ef..022170f2d1366 100644 --- a/test/std/re/re.regex/re.regex.assign/il.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/il.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp b/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp index 4c42f822a1e51..d2af1f9b3d1af 100644 --- a/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.assign/string.pass.cpp b/test/std/re/re.regex/re.regex.assign/string.pass.cpp index 7f09e5364ac41..65cc4a345ed8e 100644 --- a/test/std/re/re.regex/re.regex.assign/string.pass.cpp +++ b/test/std/re/re.regex/re.regex.assign/string.pass.cpp @@ -16,6 +16,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.const/constants.pass.cpp b/test/std/re/re.regex/re.regex.const/constants.pass.cpp index 85297b91f4337..e699de819b0d8 100644 --- a/test/std/re/re.regex/re.regex.const/constants.pass.cpp +++ b/test/std/re/re.regex/re.regex.const/constants.pass.cpp @@ -27,6 +27,7 @@ #include <regex> #include <type_traits> +#include "test_macros.h" template <class _Tp> void where(const _Tp &) {} diff --git a/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp b/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp index 4b7e5e6292942..3f1eaf6b959ef 100644 --- a/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp @@ -16,13 +16,14 @@ #include <regex> #include <cassert> +#include "test_macros.h" -int main() +int main() { using std::regex_constants::awk; assert(std::regex_match("\4", std::regex("\\4", awk))); assert(std::regex_match("\41", std::regex("\\41", awk))); assert(std::regex_match("\141", std::regex("\\141", awk))); - assert(std::regex_match("\1411", std::regex("\\1411", awk))); + assert(std::regex_match("\141" "1", std::regex("\\1411", awk))); } diff --git a/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp b/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp index 9459cd74ccff0..3c7e9f5e33c73 100644 --- a/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp @@ -17,8 +17,9 @@ #include <regex> #include <cassert> +#include "test_macros.h" -static bool error_escape_thrown(const char *pat) +static bool error_escape_thrown(const char *pat) { bool result = false; try { @@ -29,7 +30,7 @@ static bool error_escape_thrown(const char *pat) return result; } -int main() +int main() { assert(error_escape_thrown("[\\a]")); assert(error_escape_thrown("\\a")); diff --git a/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp b/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp index c21672f02c98f..0692a59542f6b 100644 --- a/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp @@ -17,8 +17,9 @@ #include <regex> #include <cassert> +#include "test_macros.h" -static bool error_badrepeat_thrown(const char *pat) +static bool error_badrepeat_thrown(const char *pat) { bool result = false; try { @@ -29,7 +30,7 @@ static bool error_badrepeat_thrown(const char *pat) return result; } -int main() +int main() { assert(error_badrepeat_thrown("?a")); assert(error_badrepeat_thrown("*a")); diff --git a/test/std/re/re.regex/re.regex.construct/copy.pass.cpp b/test/std/re/re.regex/re.regex.construct/copy.pass.cpp index c2788f0fa2c61..a266289c6a881 100644 --- a/test/std/re/re.regex/re.regex.construct/copy.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/copy.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.construct/default.pass.cpp b/test/std/re/re.regex/re.regex.construct/default.pass.cpp index d959c1ec58208..f1d7bf7696d91 100644 --- a/test/std/re/re.regex/re.regex.construct/default.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/default.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" template <class CharT> void diff --git a/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp index 70d28df370d11..c1554d6c3ebb7 100644 --- a/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp @@ -16,6 +16,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS diff --git a/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp b/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp index a38e16234191a..4a93d173e6fcf 100644 --- a/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp @@ -18,6 +18,7 @@ #include <cassert> #include "test_iterators.h" +#include "test_macros.h" template <class Iter> void diff --git a/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp index c4c440e6d2464..347989c5de151 100644 --- a/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp @@ -19,6 +19,7 @@ #include <cassert> #include "test_iterators.h" +#include "test_macros.h" template <class Iter> void diff --git a/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp b/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp index b99b58b469cf4..05fba020566bc 100644 --- a/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" template <class CharT> void diff --git a/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp index 138e20efbf657..d37b81592b4e7 100644 --- a/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" template <class CharT> void diff --git a/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp index d623a15936f4a..a0ceb70514bfe 100644 --- a/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" template <class CharT> void diff --git a/test/std/re/re.regex/re.regex.construct/string.pass.cpp b/test/std/re/re.regex/re.regex.construct/string.pass.cpp index b58b8e03cd208..a8f2e9bf6c20e 100644 --- a/test/std/re/re.regex/re.regex.construct/string.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/string.pass.cpp @@ -16,6 +16,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" template <class String> void diff --git a/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp index 768de568e2295..5f87af10224a4 100644 --- a/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp +++ b/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp @@ -17,6 +17,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" template <class String> void diff --git a/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp b/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp index c7ad39414c653..85900488f2351 100644 --- a/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp +++ b/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp @@ -19,6 +19,7 @@ #include <locale> #include <cassert> +#include "test_macros.h" #include "platform_support.h" // locale name macros int main() diff --git a/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp b/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp index 9d3c481686e78..7b231726557d6 100644 --- a/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp +++ b/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp @@ -16,6 +16,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/re.regex.swap/swap.pass.cpp b/test/std/re/re.regex/re.regex.swap/swap.pass.cpp index cda8ef3541a2c..a04c64d4a471e 100644 --- a/test/std/re/re.regex/re.regex.swap/swap.pass.cpp +++ b/test/std/re/re.regex/re.regex.swap/swap.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.regex/types.pass.cpp b/test/std/re/re.regex/types.pass.cpp index 02011ac56ebb9..5c0a5920d2013 100644 --- a/test/std/re/re.regex/types.pass.cpp +++ b/test/std/re/re.regex/types.pass.cpp @@ -20,6 +20,7 @@ #include <regex> #include <type_traits> +#include "test_macros.h" int main() { |