diff options
| author | Louis Dionne <ldionne@apple.com> | 2020-10-14 10:54:59 -0400 |
|---|---|---|
| committer | Louis Dionne <ldionne@apple.com> | 2020-10-14 12:02:37 -0400 |
| commit | 2908eb20ba753fabb9778438e8ceb4ceacbabf30 (patch) | |
| tree | e0a0f16c8e224301a367b57d33a32f7f0fa730a0 /libcxx/test/std/strings/basic.string | |
| parent | f85bcc21ddadd07f38e1db7aa286ff985bd0eb10 (diff) | |
[libc++] Split off debug tests that were missed by ce1365f8f7e into test/libcxx
Also, some tests had multiple death tests in them, so split them into
separate tests instead. The second death test would obviously never
get run, because the first one would kill the program before.
Diffstat (limited to 'libcxx/test/std/strings/basic.string')
3 files changed, 3 insertions, 38 deletions
diff --git a/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp index e2a0c2679889..783daadc268c 100644 --- a/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp @@ -11,10 +11,6 @@ // const charT& back() const; // charT& back(); -#ifdef _LIBCPP_DEBUG -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif - #include <string> #include <cassert> @@ -50,13 +46,6 @@ int main(int, char**) test(S("1234567890123456789012345678901234567890")); } #endif -#ifdef _LIBCPP_DEBUG - { - std::string s; - (void) s.back(); - assert(false); - } -#endif - return 0; + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp index eaaa678126ae..4cc9f31caaf4 100644 --- a/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp @@ -11,10 +11,6 @@ // const charT& front() const; // charT& front(); -#ifdef _LIBCPP_DEBUG -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif - #include <string> #include <cassert> @@ -50,13 +46,6 @@ int main(int, char**) test(S("1234567890123456789012345678901234567890")); } #endif -#ifdef _LIBCPP_DEBUG - { - std::string s; - (void) s.front(); - assert(false); - } -#endif - return 0; + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp index 782d92ef5a8d..8de2583ce13c 100644 --- a/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp @@ -11,10 +11,6 @@ // const_reference operator[](size_type pos) const; // reference operator[](size_type pos); -#ifdef _LIBCPP_DEBUG -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif - #include <string> #include <cassert> @@ -59,15 +55,6 @@ int main(int, char**) assert(s2[0] == '\0'); } #endif -#ifdef _LIBCPP_DEBUG - { - std::string s; - char c = s[0]; - assert(c == '\0'); - c = s[1]; - assert(false); - } -#endif - return 0; + return 0; } |
