diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:03:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:03:23 +0000 |
commit | 0dc0969cd0a732760f0aa79942a04e0eaef297c4 (patch) | |
tree | 051bdb57b1ac6ee143f61ddbb47bd0da619f6f0c /test/std/input.output | |
parent | 868847c6900e575417c03bced6e562b3af891318 (diff) |
Notes
Diffstat (limited to 'test/std/input.output')
8 files changed, 22 insertions, 11 deletions
diff --git a/test/std/input.output/file.streams/c.files/cstdio.pass.cpp b/test/std/input.output/file.streams/c.files/cstdio.pass.cpp index 5df8691ef1f94..1f1b0c3faa5b6 100644 --- a/test/std/input.output/file.streams/c.files/cstdio.pass.cpp +++ b/test/std/input.output/file.streams/c.files/cstdio.pass.cpp @@ -89,7 +89,7 @@ int main() { std::FILE* fp = 0; - std::fpos_t fpos = {}; + std::fpos_t fpos = std::fpos_t(); std::size_t s = 0; char* cp = 0; std::va_list va; diff --git a/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp index ed68279d7b572..3095712b9dbc2 100644 --- a/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp +++ b/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp @@ -12,7 +12,7 @@ // basic_istream<charT,traits>& // ignore(streamsize n = 1, int_type delim = traits::eof()); -// http://llvm.org/bugs/show_bug.cgi?id=16427 +// https://bugs.llvm.org/show_bug.cgi?id=16427 #include <sstream> #include <cassert> diff --git a/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp index e68fb774335d7..e09c0ed204616 100644 --- a/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp +++ b/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp @@ -23,6 +23,7 @@ #include <sstream> #include <ios> +#include <type_traits> #include <cctype> #include <cstdint> #include <cassert> @@ -66,11 +67,15 @@ int main() test_octal<uint64_t>("1777777777777777777777"); test_octal< int64_t>("1777777777777777777777"); test_octal<uint64_t>("1777777777777777777777"); - if (sizeof(long) == sizeof(int64_t)) { + + const bool long_is_64 = std::integral_constant<bool, sizeof(long) == sizeof(int64_t)>::value; // avoid compiler warnings + const bool long_long_is_64 = std::integral_constant<bool, sizeof(long long) == sizeof(int64_t)>::value; // avoid compiler warnings + + if (long_is_64) { test_octal< unsigned long>("1777777777777777777777"); test_octal< long>("1777777777777777777777"); } - if (sizeof(long long) == sizeof(int64_t)) { + if (long_long_is_64) { test_octal< unsigned long long>("1777777777777777777777"); test_octal< long long>("1777777777777777777777"); } @@ -81,11 +86,11 @@ int main() test_dec< int32_t>( "-1"); test_dec<uint64_t>("18446744073709551615"); test_dec< int64_t>( "-1"); - if (sizeof(long) == sizeof(int64_t)) { + if (long_is_64) { test_dec<unsigned long>("18446744073709551615"); test_dec< long>( "-1"); } - if (sizeof(long long) == sizeof(int64_t)) { + if (long_long_is_64) { test_dec<unsigned long long>("18446744073709551615"); test_dec< long long>( "-1"); } @@ -96,11 +101,11 @@ int main() test_hex< int32_t>( "FFFFFFFF"); test_hex<uint64_t>("FFFFFFFFFFFFFFFF"); test_hex< int64_t>("FFFFFFFFFFFFFFFF"); - if (sizeof(long) == sizeof(int64_t)) { + if (long_is_64) { test_hex<unsigned long>("FFFFFFFFFFFFFFFF"); test_hex< long>("FFFFFFFFFFFFFFFF"); } - if (sizeof(long long) == sizeof(int64_t)) { + if (long_long_is_64) { test_hex<unsigned long long>("FFFFFFFFFFFFFFFF"); test_hex< long long>("FFFFFFFFFFFFFFFF"); } diff --git a/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp index ec3fe48866c77..bed0d72af8094 100644 --- a/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp +++ b/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp @@ -56,7 +56,7 @@ int main() assert(seekpos_called == 2); assert(os.fail()); } - { // See https://llvm.org/bugs/show_bug.cgi?id=21361 + { // See https://bugs.llvm.org/show_bug.cgi?id=21361 seekpos_called = 0; testbuf<char> sb; std::ostream os(&sb); diff --git a/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp index ebfd24af91d5b..eb76cbf9d28a9 100644 --- a/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp +++ b/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp @@ -58,7 +58,7 @@ int main() assert(seekoff_called == 2); assert(os.fail()); } - { // See https://llvm.org/bugs/show_bug.cgi?id=21361 + { // See https://bugs.llvm.org/show_bug.cgi?id=21361 seekoff_called = 0; testbuf<char> sb; std::ostream os(&sb); diff --git a/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp b/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp index c9fccea2c7d0c..6b550b5dabe41 100644 --- a/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp +++ b/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -// Test that mismatches between strings and wides streams are diagnosed +// Test that mismatches between strings and wide streams are diagnosed #if TEST_STD_VER > 11 diff --git a/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp b/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp index 1e2ee50632afc..59f0bd4787602 100644 --- a/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp +++ b/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp @@ -13,6 +13,9 @@ // long& iword(int idx); +// This test compiles but never completes when compiled against the MSVC STL +// UNSUPPORTED: msvc + #include <ios> #include <string> #include <cassert> diff --git a/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp b/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp index 5246ad8f644c4..45115823b4c25 100644 --- a/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp +++ b/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp @@ -13,6 +13,9 @@ // void*& pword(int idx); +// This test compiles but never completes when compiled against the MSVC STL +// UNSUPPORTED: msvc + #include <ios> #include <string> #include <cassert> |