diff options
Diffstat (limited to 'test/std/experimental/string.view/string.view.modifiers')
4 files changed, 17 insertions, 9 deletions
diff --git a/test/std/experimental/string.view/string.view.modifiers/clear.pass.cpp b/test/std/experimental/string.view/string.view.modifiers/clear.pass.cpp index 6a9982e0d3a5..9a4891c8f259 100644 --- a/test/std/experimental/string.view/string.view.modifiers/clear.pass.cpp +++ b/test/std/experimental/string.view/string.view.modifiers/clear.pass.cpp @@ -15,6 +15,8 @@ #include <experimental/string_view> #include <cassert> +#include "test_macros.h" + template<typename CharT> void test ( const CharT *s, size_t len ) { typedef std::experimental::basic_string_view<CharT> SV; @@ -48,7 +50,7 @@ int main () { test ( L"a", 1 ); test ( L"", 0 ); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test ( u"ABCDE", 5 ); test ( u"a", 1 ); test ( u"", 0 ); diff --git a/test/std/experimental/string.view/string.view.modifiers/remove_prefix.pass.cpp b/test/std/experimental/string.view/string.view.modifiers/remove_prefix.pass.cpp index 0a2dd6d9329c..4a31486afaa0 100644 --- a/test/std/experimental/string.view/string.view.modifiers/remove_prefix.pass.cpp +++ b/test/std/experimental/string.view/string.view.modifiers/remove_prefix.pass.cpp @@ -16,6 +16,8 @@ #include <cassert> #include <iostream> +#include "test_macros.h" + template<typename CharT> void test ( const CharT *s, size_t len ) { typedef std::experimental::basic_string_view<CharT> SV; @@ -30,10 +32,10 @@ void test ( const CharT *s, size_t len ) { assert ( sv1.data() == (s + 1)); sv1.remove_prefix ( len - 1 ); } - + assert ( sv1.size() == 0 ); sv1.remove_prefix ( 0 ); - assert ( sv1.size() == 0 ); + assert ( sv1.size() == 0 ); } } @@ -55,7 +57,7 @@ int main () { test ( L"a", 1 ); test ( L"", 0 ); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test ( u"ABCDE", 5 ); test ( u"a", 1 ); test ( u"", 0 ); diff --git a/test/std/experimental/string.view/string.view.modifiers/remove_suffix.pass.cpp b/test/std/experimental/string.view/string.view.modifiers/remove_suffix.pass.cpp index 9dd59882cce6..9ddc6de84bf3 100644 --- a/test/std/experimental/string.view/string.view.modifiers/remove_suffix.pass.cpp +++ b/test/std/experimental/string.view/string.view.modifiers/remove_suffix.pass.cpp @@ -15,6 +15,8 @@ #include <experimental/string_view> #include <cassert> +#include "test_macros.h" + template<typename CharT> void test ( const CharT *s, size_t len ) { typedef std::experimental::basic_string_view<CharT> SV; @@ -29,10 +31,10 @@ void test ( const CharT *s, size_t len ) { assert ( sv1.data() == s); sv1.remove_suffix ( len - 1 ); } - + assert ( sv1.size() == 0 ); sv1.remove_suffix ( 0 ); - assert ( sv1.size() == 0 ); + assert ( sv1.size() == 0 ); } } @@ -55,7 +57,7 @@ int main () { test ( L"a", 1 ); test ( L"", 0 ); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test ( u"ABCDE", 5 ); test ( u"a", 1 ); test ( u"", 0 ); diff --git a/test/std/experimental/string.view/string.view.modifiers/swap.pass.cpp b/test/std/experimental/string.view/string.view.modifiers/swap.pass.cpp index cacb8ed40b88..d747def8549e 100644 --- a/test/std/experimental/string.view/string.view.modifiers/swap.pass.cpp +++ b/test/std/experimental/string.view/string.view.modifiers/swap.pass.cpp @@ -15,13 +15,15 @@ #include <experimental/string_view> #include <cassert> +#include "test_macros.h" + template<typename CharT> void test ( const CharT *s, size_t len ) { typedef std::experimental::basic_string_view<CharT> SV; { SV sv1(s); SV sv2; - + assert ( sv1.size() == len ); assert ( sv1.data() == s ); assert ( sv2.size() == 0 ); @@ -54,7 +56,7 @@ int main () { test ( L"a", 1 ); test ( L"", 0 ); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test ( u"ABCDE", 5 ); test ( u"a", 1 ); test ( u"", 0 ); |
