diff options
Diffstat (limited to 'test/std/re/re.traits')
-rw-r--r-- | test/std/re/re.traits/default.pass.cpp | 1 | ||||
-rw-r--r-- | test/std/re/re.traits/getloc.pass.cpp | 1 | ||||
-rw-r--r-- | test/std/re/re.traits/imbue.pass.cpp | 1 | ||||
-rw-r--r-- | test/std/re/re.traits/isctype.pass.cpp | 5 | ||||
-rw-r--r-- | test/std/re/re.traits/length.pass.cpp | 1 | ||||
-rw-r--r-- | test/std/re/re.traits/lookup_classname.pass.cpp | 14 | ||||
-rw-r--r-- | test/std/re/re.traits/lookup_collatename.pass.cpp | 3 | ||||
-rw-r--r-- | test/std/re/re.traits/transform.pass.cpp | 2 | ||||
-rw-r--r-- | test/std/re/re.traits/transform_primary.pass.cpp | 3 | ||||
-rw-r--r-- | test/std/re/re.traits/translate.pass.cpp | 1 | ||||
-rw-r--r-- | test/std/re/re.traits/translate_nocase.pass.cpp | 1 | ||||
-rw-r--r-- | test/std/re/re.traits/types.pass.cpp | 1 | ||||
-rw-r--r-- | test/std/re/re.traits/value.pass.cpp | 1 |
13 files changed, 32 insertions, 3 deletions
diff --git a/test/std/re/re.traits/default.pass.cpp b/test/std/re/re.traits/default.pass.cpp index defadd95378ba..b1e23587d21f7 100644 --- a/test/std/re/re.traits/default.pass.cpp +++ b/test/std/re/re.traits/default.pass.cpp @@ -19,6 +19,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" #include "platform_support.h" // locale name macros int main() diff --git a/test/std/re/re.traits/getloc.pass.cpp b/test/std/re/re.traits/getloc.pass.cpp index 0b7810a2099d5..929659d004b0e 100644 --- a/test/std/re/re.traits/getloc.pass.cpp +++ b/test/std/re/re.traits/getloc.pass.cpp @@ -18,6 +18,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" #include "platform_support.h" // locale name macros int main() diff --git a/test/std/re/re.traits/imbue.pass.cpp b/test/std/re/re.traits/imbue.pass.cpp index 6988058a832c7..04b4f5f7692b5 100644 --- a/test/std/re/re.traits/imbue.pass.cpp +++ b/test/std/re/re.traits/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.traits/isctype.pass.cpp b/test/std/re/re.traits/isctype.pass.cpp index ad69f05ae75e5..3d1e7470a8837 100644 --- a/test/std/re/re.traits/isctype.pass.cpp +++ b/test/std/re/re.traits/isctype.pass.cpp @@ -13,8 +13,13 @@ // bool isctype(charT c, char_class_type f) const; +// TODO(EricWF): This test takes 40+ minutes to build with Clang 3.8 under ASAN or MSAN. +// UNSUPPORTED: asan, msan + + #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.traits/length.pass.cpp b/test/std/re/re.traits/length.pass.cpp index 473c233c531e7..b80f9b5b400ae 100644 --- a/test/std/re/re.traits/length.pass.cpp +++ b/test/std/re/re.traits/length.pass.cpp @@ -16,6 +16,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.traits/lookup_classname.pass.cpp b/test/std/re/re.traits/lookup_classname.pass.cpp index 0b1b18eb50774..4f7cf61ebf99c 100644 --- a/test/std/re/re.traits/lookup_classname.pass.cpp +++ b/test/std/re/re.traits/lookup_classname.pass.cpp @@ -18,6 +18,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" #include "test_iterators.h" template <class char_type> @@ -33,6 +34,19 @@ test(const char_type* A, int main() { +// if __regex_word is not distinct from all the classes, bad things happen +// See https://llvm.org/bugs/show_bug.cgi?id=26476 for an example. + assert((std::ctype_base::space & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::print & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::cntrl & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::upper & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::lower & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::alpha & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::digit & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::punct & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::xdigit & std::regex_traits<char>::__regex_word) == 0); + assert((std::ctype_base::blank & std::regex_traits<char>::__regex_word) == 0); + test("d", std::ctype_base::digit); test("D", std::ctype_base::digit); test("d", std::ctype_base::digit, true); diff --git a/test/std/re/re.traits/lookup_collatename.pass.cpp b/test/std/re/re.traits/lookup_collatename.pass.cpp index a7cd5f0715612..3aeed7bddf755 100644 --- a/test/std/re/re.traits/lookup_collatename.pass.cpp +++ b/test/std/re/re.traits/lookup_collatename.pass.cpp @@ -23,8 +23,9 @@ #include <regex> #include <iterator> #include <cassert> -#include "test_iterators.h" +#include "test_macros.h" +#include "test_iterators.h" #include "platform_support.h" // locale name macros template <class char_type> diff --git a/test/std/re/re.traits/transform.pass.cpp b/test/std/re/re.traits/transform.pass.cpp index 85235e045d883..57e6b753abefa 100644 --- a/test/std/re/re.traits/transform.pass.cpp +++ b/test/std/re/re.traits/transform.pass.cpp @@ -19,8 +19,8 @@ #include <regex> #include <cassert> +#include "test_macros.h" #include "test_iterators.h" - #include "platform_support.h" // locale name macros int main() diff --git a/test/std/re/re.traits/transform_primary.pass.cpp b/test/std/re/re.traits/transform_primary.pass.cpp index 438cd75452bbb..03b4f3985a609 100644 --- a/test/std/re/re.traits/transform_primary.pass.cpp +++ b/test/std/re/re.traits/transform_primary.pass.cpp @@ -20,8 +20,9 @@ #include <regex> #include <cassert> -#include "test_iterators.h" +#include "test_macros.h" +#include "test_iterators.h" #include "platform_support.h" // locale name macros int main() diff --git a/test/std/re/re.traits/translate.pass.cpp b/test/std/re/re.traits/translate.pass.cpp index c3523387c56ba..7eaf30ea71c32 100644 --- a/test/std/re/re.traits/translate.pass.cpp +++ b/test/std/re/re.traits/translate.pass.cpp @@ -16,6 +16,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.traits/translate_nocase.pass.cpp b/test/std/re/re.traits/translate_nocase.pass.cpp index f9fa38ddf26a6..bf79629d33b4d 100644 --- a/test/std/re/re.traits/translate_nocase.pass.cpp +++ b/test/std/re/re.traits/translate_nocase.pass.cpp @@ -25,6 +25,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" #include "platform_support.h" int main() diff --git a/test/std/re/re.traits/types.pass.cpp b/test/std/re/re.traits/types.pass.cpp index 50586a1f29f37..611ef04342fec 100644 --- a/test/std/re/re.traits/types.pass.cpp +++ b/test/std/re/re.traits/types.pass.cpp @@ -20,6 +20,7 @@ #include <regex> #include <type_traits> +#include "test_macros.h" int main() { diff --git a/test/std/re/re.traits/value.pass.cpp b/test/std/re/re.traits/value.pass.cpp index 349a29cc6bc15..dfed66c35c46b 100644 --- a/test/std/re/re.traits/value.pass.cpp +++ b/test/std/re/re.traits/value.pass.cpp @@ -15,6 +15,7 @@ #include <regex> #include <cassert> +#include "test_macros.h" int main() { |