diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp index 6ad0ec11808c5..854e271fcabb5 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp @@ -22,7 +22,7 @@ template bool is_skipws ( const std::basic_istream& is ) { return ( is.flags() & std::ios_base::skipws ) != 0; - } +} template > void both_ways ( const CharT *p ) { @@ -34,7 +34,7 @@ void both_ways ( const CharT *p ) { ((void)skippingws); // Prevent unused warning ss << q; ss >> q; - } +} template > void round_trip ( const CharT *p ) { @@ -46,7 +46,7 @@ void round_trip ( const CharT *p ) { ss >> std::quoted(s); assert ( s == p ); assert ( skippingws == is_skipws ( ss )); - } +} template > @@ -60,7 +60,7 @@ void round_trip_ws ( const CharT *p ) { ss >> std::quoted(s); assert ( s == p ); assert ( skippingws == is_skipws ( ss )); - } +} template > void round_trip_d ( const CharT *p, char delim ) { @@ -71,7 +71,7 @@ void round_trip_d ( const CharT *p, char delim ) { std::basic_string s; ss >> std::quoted(s, d); assert ( s == p ); - } +} template > void round_trip_e ( const CharT *p, char escape ) { @@ -82,7 +82,7 @@ void round_trip_e ( const CharT *p, char escape ) { std::basic_string s; ss >> std::quoted(s, CharT('"'), e ); assert ( s == p ); - } +} template > diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.compile.fail.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.verify.cpp similarity index 72% rename from libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.compile.fail.cpp rename to libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.verify.cpp index 4b343013e2583..9340edbf80a31 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.compile.fail.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.verify.cpp @@ -10,6 +10,8 @@ // quoted +// UNSUPPORTED: c++03, c++11 + #include #include #include @@ -19,21 +21,13 @@ // Test that mismatches between strings and wide streams are diagnosed -#if TEST_STD_VER > 11 - void round_trip ( const char *p ) { std::wstringstream ss; - ss << std::quoted(p); + ss << std::quoted(p); // expected-error {{invalid operands to binary expression}} std::string s; - ss >> std::quoted(s); - } - - + ss >> std::quoted(s); // expected-error {{invalid operands to binary expression}} +} -int main(int, char**) -{ - round_trip ( "Hi Mom" ); +int main(int, char**) { + round_trip("Hi Mom"); } -#else -#error -#endif diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.compile.fail.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.verify.cpp similarity index 77% rename from libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.compile.fail.cpp rename to libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.verify.cpp index b19eea376d825..5a92485ced56f 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.compile.fail.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.verify.cpp @@ -10,6 +10,8 @@ // quoted +// UNSUPPORTED: c++03, c++11 + #include #include #include @@ -17,29 +19,20 @@ #include "test_macros.h" -#if TEST_STD_VER > 11 - // Test that mismatches in the traits between the quoted object and the dest string are diagnosed. template -struct test_traits -{ - typedef charT char_type; +struct test_traits { + typedef charT char_type; }; void round_trip ( const char *p ) { std::stringstream ss; ss << std::quoted(p); std::basic_string> s; - ss >> std::quoted(s); - } - - + ss >> std::quoted(s); // expected-error {{invalid operands to binary expression}} +} -int main(int, char**) -{ - round_trip ( "Hi Mom" ); +int main(int, char**) { + round_trip("Hi Mom"); } -#else -#error -#endif