From 5a83710e371fe68a06e6e3876c6a2c8b820a8976 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sat, 20 Dec 2014 01:40:03 +0000 Subject: Move test into test/std subdirectory. llvm-svn: 224658 --- .../file.streams/c.files/cinttypes.pass.cpp | 929 --------------------- .../file.streams/c.files/cstdio.pass.cpp | 139 --- .../file.streams/c.files/gets.fail.cpp | 23 - .../file.streams/c.files/version_ccstdio.pass.cpp | 20 - .../c.files/version_cinttypes.pass.cpp | 20 - .../fstreams/filebuf.assign/member_swap.pass.cpp | 54 -- .../fstreams/filebuf.assign/move_assign.pass.cpp | 56 -- .../filebuf.assign/nonmember_swap.pass.cpp | 56 -- .../fstreams/filebuf.cons/default.pass.cpp | 30 - .../fstreams/filebuf.cons/move.pass.cpp | 54 -- .../fstreams/filebuf.members/open_pointer.pass.cpp | 51 -- .../fstreams/filebuf.virtuals/overflow.pass.cpp | 142 ---- .../fstreams/filebuf.virtuals/pbackfail.pass.cpp | 56 -- .../fstreams/filebuf.virtuals/seekoff.pass.cpp | 66 -- .../fstreams/filebuf.virtuals/underflow.dat | 1 - .../fstreams/filebuf.virtuals/underflow.pass.cpp | 121 --- .../fstreams/filebuf.virtuals/underflow_utf8.dat | 1 - .../file.streams/fstreams/filebuf/types.pass.cpp | 34 - .../fstreams/fstream.assign/member_swap.pass.cpp | 71 -- .../fstreams/fstream.assign/move_assign.pass.cpp | 50 -- .../fstream.assign/nonmember_swap.pass.cpp | 72 -- .../fstreams/fstream.cons/default.pass.cpp | 28 - .../fstreams/fstream.cons/move.pass.cpp | 48 -- .../fstreams/fstream.cons/pointer.pass.cpp | 44 - .../fstreams/fstream.cons/string.pass.cpp | 46 - .../fstreams/fstream.members/close.pass.cpp | 42 - .../fstreams/fstream.members/open_pointer.pass.cpp | 50 -- .../fstreams/fstream.members/open_string.pass.cpp | 50 -- .../fstreams/fstream.members/rdbuf.pass.cpp | 30 - .../file.streams/fstreams/fstream/types.pass.cpp | 34 - .../fstreams/ifstream.assign/member_swap.pass.cpp | 42 - .../fstreams/ifstream.assign/move_assign.pass.cpp | 40 - .../ifstream.assign/nonmember_swap.pass.cpp | 43 - .../file.streams/fstreams/ifstream.assign/test.dat | 1 - .../fstreams/ifstream.assign/test2.dat | 1 - .../fstreams/ifstream.cons/default.pass.cpp | 28 - .../fstreams/ifstream.cons/move.pass.cpp | 38 - .../fstreams/ifstream.cons/pointer.pass.cpp | 46 - .../fstreams/ifstream.cons/string.pass.cpp | 46 - .../file.streams/fstreams/ifstream.cons/test.dat | 1 - .../fstreams/ifstream.members/close.pass.cpp | 38 - .../ifstream.members/open_pointer.pass.cpp | 46 - .../fstreams/ifstream.members/open_string.pass.cpp | 46 - .../fstreams/ifstream.members/rdbuf.pass.cpp | 32 - .../fstreams/ifstream.members/test.dat | 1 - .../file.streams/fstreams/ifstream/types.pass.cpp | 34 - .../fstreams/ofstream.assign/member_swap.pass.cpp | 79 -- .../fstreams/ofstream.assign/move_assign.pass.cpp | 52 -- .../ofstream.assign/nonmember_swap.pass.cpp | 80 -- .../fstreams/ofstream.cons/default.pass.cpp | 28 - .../fstreams/ofstream.cons/move.pass.cpp | 50 -- .../fstreams/ofstream.cons/pointer.pass.cpp | 46 - .../fstreams/ofstream.cons/string.pass.cpp | 46 - .../fstreams/ofstream.members/close.pass.cpp | 42 - .../ofstream.members/open_pointer.pass.cpp | 58 -- .../fstreams/ofstream.members/open_string.pass.cpp | 58 -- .../fstreams/ofstream.members/rdbuf.pass.cpp | 36 - .../file.streams/fstreams/ofstream/types.pass.cpp | 34 - .../file.streams/fstreams/version.pass.cpp | 20 - .../file.streams/nothing_to_do.pass.cpp | 12 - .../input.output.general/nothing_to_do.pass.cpp | 12 - .../iostream.format/ext.manip/get_money.pass.cpp | 75 -- .../iostream.format/ext.manip/get_time.pass.cpp | 73 -- .../iostream.format/ext.manip/put_money.pass.cpp | 91 -- .../iostream.format/ext.manip/put_time.pass.cpp | 84 -- .../iostream.assign/member_swap.pass.cpp | 85 -- .../iostream.assign/move_assign.pass.cpp | 92 -- .../iostreamclass/iostream.cons/move.pass.cpp | 78 -- .../iostreamclass/iostream.cons/streambuf.pass.cpp | 55 -- .../iostream.dest/nothing_to_do.pass.cpp | 12 - .../input.streams/iostreamclass/types.pass.cpp | 37 - .../istream.formatted.arithmetic/bool.pass.cpp | 79 -- .../istream.formatted.arithmetic/double.pass.cpp | 79 -- .../istream.formatted.arithmetic/float.pass.cpp | 79 -- .../istream.formatted.arithmetic/int.pass.cpp | 79 -- .../istream.formatted.arithmetic/long.pass.cpp | 79 -- .../long_double.pass.cpp | 79 -- .../long_long.pass.cpp | 79 -- .../istream.formatted.arithmetic/pointer.pass.cpp | 97 --- .../istream.formatted.arithmetic/short.pass.cpp | 79 -- .../unsigned_int.pass.cpp | 79 -- .../unsigned_long.pass.cpp | 79 -- .../unsigned_long_long.pass.cpp | 79 -- .../unsigned_short.pass.cpp | 79 -- .../tested_elsewhere.pass.cpp | 12 - .../istream_extractors/basic_ios.pass.cpp | 38 - .../istream_extractors/chart.pass.cpp | 87 -- .../istream_extractors/ios_base.pass.cpp | 36 - .../istream_extractors/istream.pass.cpp | 38 - .../istream_extractors/signed_char.pass.cpp | 70 -- .../signed_char_pointer.pass.cpp | 85 -- .../istream_extractors/streambuf.pass.cpp | 69 -- .../istream_extractors/unsigned_char.pass.cpp | 70 -- .../unsigned_char_pointer.pass.cpp | 85 -- .../istream_extractors/wchar_t_pointer.pass.cpp | 85 -- .../istream.formatted/nothing_to_do.pass.cpp | 12 - .../input.streams/istream.manip/ws.pass.cpp | 79 -- .../input.streams/istream.rvalue/rvalue.pass.cpp | 63 -- .../input.streams/istream.unformatted/get.pass.cpp | 100 --- .../istream.unformatted/get_chart.pass.cpp | 103 --- .../istream.unformatted/get_pointer_size.pass.cpp | 99 --- .../get_pointer_size_chart.pass.cpp | 99 --- .../istream.unformatted/get_streambuf.pass.cpp | 88 -- .../get_streambuf_chart.pass.cpp | 89 -- .../getline_pointer_size.pass.cpp | 83 -- .../getline_pointer_size_chart.pass.cpp | 83 -- .../istream.unformatted/ignore.pass.cpp | 76 -- .../istream.unformatted/ignore_0xff.pass.cpp | 34 - .../istream.unformatted/peek.pass.cpp | 69 -- .../istream.unformatted/putback.pass.cpp | 89 -- .../istream.unformatted/read.pass.cpp | 81 -- .../istream.unformatted/readsome.pass.cpp | 85 -- .../istream.unformatted/seekg.pass.cpp | 66 -- .../istream.unformatted/seekg_off.pass.cpp | 74 -- .../istream.unformatted/sync.pass.cpp | 64 -- .../istream.unformatted/tellg.pass.cpp | 63 -- .../istream.unformatted/unget.pass.cpp | 81 -- .../istream/istream.assign/member_swap.pass.cpp | 85 -- .../istream/istream.assign/move_assign.pass.cpp | 92 -- .../istream/istream.cons/move.pass.cpp | 78 -- .../istream/istream.cons/streambuf.pass.cpp | 55 -- .../istream/istream_sentry/ctor.pass.cpp | 128 --- .../input.streams/istream/types.pass.cpp | 35 - .../iostream.format/input.streams/version.pass.cpp | 20 - .../iostream.format/nothing_to_do.pass.cpp | 12 - .../ostream.assign/member_swap.pass.cpp | 85 -- .../ostream.assign/move_assign.pass.cpp | 92 -- .../output.streams/ostream.cons/move.pass.cpp | 74 -- .../output.streams/ostream.cons/streambuf.pass.cpp | 53 -- .../ostream.formatted/nothing_to_do.pass.cpp | 12 - .../tested_elsewhere.pass.cpp | 12 - .../ostream.inserters.arithmetic/bool.pass.cpp | 91 -- .../ostream.inserters.arithmetic/double.pass.cpp | 83 -- .../ostream.inserters.arithmetic/float.pass.cpp | 83 -- .../ostream.inserters.arithmetic/int.pass.cpp | 83 -- .../ostream.inserters.arithmetic/long.pass.cpp | 83 -- .../long_double.pass.cpp | 83 -- .../long_long.pass.cpp | 83 -- .../ostream.inserters.arithmetic/pointer.pass.cpp | 82 -- .../ostream.inserters.arithmetic/short.pass.cpp | 83 -- .../unsigned_int.pass.cpp | 83 -- .../unsigned_long.pass.cpp | 83 -- .../unsigned_long_long.pass.cpp | 83 -- .../unsigned_short.pass.cpp | 83 -- .../ostream.inserters.character/CharT.pass.cpp | 88 -- .../CharT_pointer.pass.cpp | 88 -- .../ostream.inserters.character/char.pass.cpp | 88 -- .../char_pointer.pass.cpp | 88 -- .../char_to_wide.pass.cpp | 88 -- .../char_to_wide_pointer.pass.cpp | 88 -- .../signed_char.pass.cpp | 88 -- .../signed_char_pointer.pass.cpp | 88 -- .../unsigned_char.pass.cpp | 88 -- .../unsigned_char_pointer.pass.cpp | 88 -- .../ostream.inserters/basic_ios.pass.cpp | 70 -- .../ostream.inserters/ios_base.pass.cpp | 61 -- .../ostream.inserters/ostream.pass.cpp | 69 -- .../ostream.inserters/streambuf.pass.cpp | 69 -- .../output.streams/ostream.manip/endl.pass.cpp | 80 -- .../output.streams/ostream.manip/ends.pass.cpp | 71 -- .../output.streams/ostream.manip/flush.pass.cpp | 58 -- .../ostream.rvalue/CharT_pointer.pass.cpp | 72 -- .../output.streams/ostream.seeks/seekp.pass.cpp | 57 -- .../output.streams/ostream.seeks/seekp2.pass.cpp | 59 -- .../output.streams/ostream.seeks/tellp.pass.cpp | 54 -- .../ostream.unformatted/flush.pass.cpp | 54 -- .../ostream.unformatted/put.pass.cpp | 76 -- .../ostream.unformatted/write.pass.cpp | 76 -- .../output.streams/ostream/types.pass.cpp | 35 - .../ostream_sentry/construct.pass.cpp | 61 -- .../ostream_sentry/destruct.pass.cpp | 75 -- .../output.streams/version.pass.cpp | 20 - .../iostream.format/quoted.manip/quoted.pass.cpp | 219 ----- .../quoted.manip/quoted_char.fail.cpp | 36 - .../quoted.manip/quoted_traits.fail.cpp | 42 - .../std.manip/resetiosflags.pass.cpp | 54 -- .../iostream.format/std.manip/setbase.pass.cpp | 74 -- .../iostream.format/std.manip/setfill.pass.cpp | 38 - .../iostream.format/std.manip/setiosflags.pass.cpp | 54 -- .../std.manip/setprecision.pass.cpp | 50 -- .../iostream.format/std.manip/setw.pass.cpp | 50 -- .../iostream.format/std.manip/version.pass.cpp | 20 - .../input.output/iostream.forward/iosfwd.pass.cpp | 142 ---- .../input.output/iostream.forward/version.pass.cpp | 20 - .../narrow.stream.objects/cerr.pass.cpp | 25 - .../narrow.stream.objects/cin.pass.cpp | 28 - .../narrow.stream.objects/clog.pass.cpp | 23 - .../narrow.stream.objects/cout.pass.cpp | 27 - .../input.output/iostream.objects/version.pass.cpp | 20 - .../wide.stream.objects/wcerr.pass.cpp | 25 - .../wide.stream.objects/wcin.pass.cpp | 28 - .../wide.stream.objects/wclog.pass.cpp | 23 - .../wide.stream.objects/wcout.pass.cpp | 23 - .../fpos/fpos.members/state.pass.cpp | 24 - .../fpos/fpos.operations/addition.pass.cpp | 28 - .../fpos/fpos.operations/ctor_int.pass.cpp | 24 - .../fpos/fpos.operations/difference.pass.cpp | 26 - .../fpos/fpos.operations/eq_int.pass.cpp | 26 - .../fpos/fpos.operations/offset.pass.cpp | 25 - .../fpos/fpos.operations/streamsize.pass.cpp | 24 - .../fpos/fpos.operations/subtraction.pass.cpp | 28 - .../iostreams.base/fpos/nothing_to_do.pass.cpp | 12 - .../ios.base/fmtflags.state/flags.pass.cpp | 33 - .../fmtflags.state/flags_fmtflags.pass.cpp | 36 - .../ios.base/fmtflags.state/precision.pass.cpp | 33 - .../fmtflags.state/precision_streamsize.pass.cpp | 36 - .../ios.base/fmtflags.state/setf_fmtflags.pass.cpp | 36 - .../fmtflags.state/setf_fmtflags_mask.pass.cpp | 36 - .../ios.base/fmtflags.state/unsetf_mask.pass.cpp | 35 - .../ios.base/fmtflags.state/width.pass.cpp | 33 - .../fmtflags.state/width_streamsize.pass.cpp | 36 - .../ios.base.callback/register_callback.pass.cpp | 54 -- .../ios.base/ios.base.cons/dtor.pass.cpp | 86 -- .../ios.base/ios.base.locales/getloc.pass.cpp | 34 - .../ios.base/ios.base.locales/imbue.pass.cpp | 89 -- .../ios.base/ios.base.storage/iword.pass.cpp | 42 - .../ios.base/ios.base.storage/pword.pass.cpp | 43 - .../ios.base/ios.base.storage/xalloc.pass.cpp | 26 - .../ios.members.static/sync_with_stdio.pass.cpp | 27 - .../ios.types/ios_Init/tested_elsewhere.pass.cpp | 12 - .../ctor_char_pointer_error_code.pass.cpp | 39 - .../ios_failure/ctor_string_error_code.pass.cpp | 39 - .../ios.types/ios_fmtflags/fmtflags.pass.cpp | 81 -- .../ios.types/ios_iostate/iostate.pass.cpp | 36 - .../ios.types/ios_openmode/openmode.pass.cpp | 42 - .../ios.types/ios_seekdir/seekdir.pass.cpp | 26 - .../ios.base/ios.types/nothing_to_do.pass.cpp | 12 - .../iostreams.base/ios.base/nothing_to_do.pass.cpp | 16 - .../ios/basic.ios.cons/ctor_streambuf.pass.cpp | 48 -- .../ios/basic.ios.members/copyfmt.pass.cpp | 190 ----- .../ios/basic.ios.members/fill.pass.cpp | 23 - .../ios/basic.ios.members/fill_char_type.pass.cpp | 26 - .../ios/basic.ios.members/imbue.pass.cpp | 101 --- .../ios/basic.ios.members/move.pass.cpp | 140 ---- .../ios/basic.ios.members/narow.pass.cpp | 24 - .../ios/basic.ios.members/rdbuf.pass.cpp | 31 - .../ios/basic.ios.members/rdbuf_streambuf.pass.cpp | 34 - .../ios/basic.ios.members/set_rdbuf.pass.cpp | 57 -- .../ios/basic.ios.members/swap.pass.cpp | 168 ---- .../ios/basic.ios.members/tie.pass.cpp | 23 - .../ios/basic.ios.members/tie_ostream.pass.cpp | 26 - .../ios/basic.ios.members/widen.pass.cpp | 23 - .../iostreams.base/ios/iostate.flags/bad.pass.cpp | 41 - .../iostreams.base/ios/iostate.flags/bool.pass.cpp | 25 - .../ios/iostate.flags/clear.pass.cpp | 65 -- .../iostreams.base/ios/iostate.flags/eof.pass.cpp | 37 - .../ios/iostate.flags/exceptions.pass.cpp | 33 - .../ios/iostate.flags/exceptions_iostate.pass.cpp | 48 -- .../iostreams.base/ios/iostate.flags/fail.pass.cpp | 41 - .../iostreams.base/ios/iostate.flags/good.pass.cpp | 35 - .../iostreams.base/ios/iostate.flags/not.pass.cpp | 25 - .../ios/iostate.flags/rdstate.pass.cpp | 25 - .../ios/iostate.flags/setstate.pass.cpp | 64 -- .../input.output/iostreams.base/ios/types.pass.cpp | 33 - .../adjustfield.manip/internal.pass.cpp | 29 - .../std.ios.manip/adjustfield.manip/left.pass.cpp | 29 - .../std.ios.manip/adjustfield.manip/right.pass.cpp | 29 - .../std.ios.manip/basefield.manip/dec.pass.cpp | 29 - .../std.ios.manip/basefield.manip/hex.pass.cpp | 29 - .../std.ios.manip/basefield.manip/oct.pass.cpp | 29 - .../error.reporting/iostream_category.pass.cpp | 23 - .../error.reporting/make_error_code.pass.cpp | 24 - .../error.reporting/make_error_condition.pass.cpp | 24 - .../floatfield.manip/defaultfloat.pass.cpp | 30 - .../std.ios.manip/floatfield.manip/fixed.pass.cpp | 29 - .../floatfield.manip/hexfloat.pass.cpp | 30 - .../floatfield.manip/scientific.pass.cpp | 29 - .../fmtflags.manip/boolalpha.pass.cpp | 29 - .../fmtflags.manip/noboolalpha.pass.cpp | 30 - .../fmtflags.manip/noshowbase.pass.cpp | 30 - .../fmtflags.manip/noshowpoint.pass.cpp | 30 - .../fmtflags.manip/noshowpos.pass.cpp | 30 - .../std.ios.manip/fmtflags.manip/noskipws.pass.cpp | 30 - .../fmtflags.manip/nounitbuf.pass.cpp | 30 - .../fmtflags.manip/nouppercase.pass.cpp | 30 - .../std.ios.manip/fmtflags.manip/showbase.pass.cpp | 29 - .../fmtflags.manip/showpoint.pass.cpp | 29 - .../std.ios.manip/fmtflags.manip/showpos.pass.cpp | 29 - .../std.ios.manip/fmtflags.manip/skipws.pass.cpp | 29 - .../std.ios.manip/fmtflags.manip/unitbuf.pass.cpp | 29 - .../fmtflags.manip/uppercase.pass.cpp | 29 - .../std.ios.manip/nothing_to_do.pass.cpp | 12 - .../iostreams.base/stream.types/streamoff.pass.cpp | 21 - .../stream.types/streamsize.pass.cpp | 21 - .../input.output/iostreams.base/version.pass.cpp | 20 - .../tested_elsewhere.pass.cpp | 12 - .../iostreams.limits.pos/nothing_to_do.pass.cpp | 12 - .../iostreams.threadsafety/nothing_to_do.pass.cpp | 12 - .../iostreams.requirements/nothing_to_do.pass.cpp | 12 - libcxx/test/input.output/nothing_to_do.pass.cpp | 12 - .../streambuf.reqts/tested_elsewhere.pass.cpp | 12 - .../streambuf/streambuf.cons/copy.fail.cpp | 25 - .../streambuf/streambuf.cons/copy.pass.cpp | 84 -- .../streambuf/streambuf.cons/default.fail.cpp | 22 - .../streambuf/streambuf.cons/default.pass.cpp | 56 -- .../streambuf.members/nothing_to_do.pass.cpp | 12 - .../streambuf.buffer/pubseekoff.pass.cpp | 35 - .../streambuf.buffer/pubseekpos.pass.cpp | 34 - .../streambuf.buffer/pubsetbuf.pass.cpp | 33 - .../streambuf.buffer/pubsync.pass.cpp | 33 - .../streambuf.locales/locales.pass.cpp | 51 -- .../streambuf.pub.get/in_avail.pass.cpp | 52 -- .../streambuf.pub.get/sbumpc.pass.cpp | 56 -- .../streambuf.pub.get/sgetc.pass.cpp | 56 -- .../streambuf.pub.get/sgetn.pass.cpp | 41 - .../streambuf.pub.get/snextc.pass.cpp | 56 -- .../streambuf.pub.pback/sputbackc.pass.cpp | 56 -- .../streambuf.pub.pback/sungetc.pass.cpp | 56 -- .../streambuf.pub.put/sputc.pass.cpp | 63 -- .../streambuf.pub.put/sputn.pass.cpp | 41 - .../streambuf.protected/nothing_to_do.pass.cpp | 12 - .../streambuf.assign/assign.pass.cpp | 91 -- .../streambuf.assign/swap.pass.cpp | 101 --- .../streambuf.get.area/gbump.pass.cpp | 59 -- .../streambuf.get.area/setg.pass.cpp | 49 -- .../streambuf.put.area/pbump.pass.cpp | 61 -- .../streambuf.put.area/setp.pass.cpp | 49 -- .../streambuf.virtuals/nothing_to_do.pass.cpp | 12 - .../tested_elsewhere.pass.cpp | 12 - .../streambuf.virt.get/showmanyc.pass.cpp | 33 - .../streambuf.virt.get/uflow.pass.cpp | 33 - .../streambuf.virt.get/underflow.pass.cpp | 30 - .../streambuf.virt.get/xsgetn.pass.cpp | 41 - .../streambuf.virt.locales/nothing_to_do.pass.cpp | 12 - .../streambuf.virt.pback/pbackfail.pass.cpp | 32 - .../streambuf.virt.put/overflow.pass.cpp | 30 - .../streambuf.virt.put/xsputn.pass.cpp | 44 - .../stream.buffers/streambuf/types.pass.cpp | 39 - .../input.output/stream.buffers/version.pass.cpp | 20 - .../istringstream.assign/member_swap.pass.cpp | 56 -- .../istringstream.assign/move.pass.cpp | 86 -- .../istringstream.assign/nonmember_swap.pass.cpp | 59 -- .../istringstream.cons/default.pass.cpp | 46 - .../istringstream/istringstream.cons/move.pass.cpp | 48 -- .../istringstream.cons/string.pass.cpp | 67 -- .../istringstream.members/str.pass.cpp | 56 -- .../string.streams/istringstream/types.pass.cpp | 36 - .../ostringstream.assign/member_swap.pass.cpp | 48 -- .../ostringstream.assign/move.pass.cpp | 46 - .../ostringstream.assign/nonmember_swap.pass.cpp | 48 -- .../ostringstream.cons/default.pass.cpp | 46 - .../ostringstream/ostringstream.cons/move.pass.cpp | 44 - .../ostringstream.cons/string.pass.cpp | 59 -- .../ostringstream.members/str.pass.cpp | 52 -- .../string.streams/ostringstream/types.pass.cpp | 36 - .../stringbuf.assign/member_swap.pass.cpp | 64 -- .../stringbuf/stringbuf.assign/move.pass.cpp | 58 -- .../stringbuf.assign/nonmember_swap.pass.cpp | 66 -- .../stringbuf/stringbuf.cons/default.pass.cpp | 30 - .../stringbuf/stringbuf.cons/move.pass.cpp | 52 -- .../stringbuf/stringbuf.cons/string.pass.cpp | 47 -- .../stringbuf/stringbuf.members/str.pass.cpp | 34 - .../stringbuf/stringbuf.virtuals/overflow.pass.cpp | 97 --- .../stringbuf.virtuals/pbackfail.pass.cpp | 92 -- .../stringbuf/stringbuf.virtuals/seekoff.pass.cpp | 143 ---- .../stringbuf/stringbuf.virtuals/seekpos.pass.cpp | 77 -- .../stringbuf/stringbuf.virtuals/setbuf.pass.cpp | 32 - .../stringbuf.virtuals/underflow.pass.cpp | 70 -- .../string.streams/stringbuf/types.pass.cpp | 36 - .../stringstream.cons/default.pass.cpp | 46 - .../string.streams/stringstream.cons/move.pass.cpp | 52 -- .../stringstream.cons/move2.pass.cpp | 37 - .../stringstream.cons/string.pass.cpp | 49 -- .../stringstream.assign/member_swap.pass.cpp | 56 -- .../stringstream.assign/move.pass.cpp | 54 -- .../stringstream.assign/nonmember_swap.pass.cpp | 59 -- .../stringstream.members/str.pass.cpp | 62 -- .../string.streams/stringstream/types.pass.cpp | 36 - .../input.output/string.streams/version.pass.cpp | 20 - 369 files changed, 19940 deletions(-) delete mode 100644 libcxx/test/input.output/file.streams/c.files/cinttypes.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/c.files/cstdio.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/c.files/gets.fail.cpp delete mode 100644 libcxx/test/input.output/file.streams/c.files/version_ccstdio.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/c.files/version_cinttypes.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.dat delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow_utf8.dat delete mode 100644 libcxx/test/input.output/file.streams/fstreams/filebuf/types.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream.members/rdbuf.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/fstream/types.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.assign/test.dat delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.assign/test2.dat delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.cons/test.dat delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream.members/test.dat delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ifstream/types.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.members/close.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/ofstream/types.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/fstreams/version.pass.cpp delete mode 100644 libcxx/test/input.output/file.streams/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/input.output.general/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/ext.manip/get_money.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/ext.manip/get_time.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/ext.manip/put_money.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/ext.manip/put_time.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.dest/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/iostreamclass/types.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.reqmts/tested_elsewhere.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.formatted/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/tellg.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/istream/types.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/input.streams/version.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.reqmts/tested_elsewhere.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.manip/flush.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/flush.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream/types.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/output.streams/version.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp delete mode 100644 libcxx/test/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp delete mode 100644 libcxx/test/input.output/iostream.format/std.manip/resetiosflags.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/std.manip/setbase.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/std.manip/setfill.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/std.manip/setiosflags.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/std.manip/setprecision.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/std.manip/setw.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.format/std.manip/version.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.forward/iosfwd.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.forward/version.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/version.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp delete mode 100644 libcxx/test/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/fpos.members/state.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/fpos.operations/ctor_int.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/fpos.operations/difference.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/fpos.operations/eq_int.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/fpos.operations/streamsize.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/fpos/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/flags.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/flags_fmtflags.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/precision.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/precision_streamsize.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags_mask.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/unsetf_mask.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/width.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/width_streamsize.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.base.cons/dtor.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.members.static/sync_with_stdio.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_Init/tested_elsewhere.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_fmtflags/fmtflags.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_openmode/openmode.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_seekdir/seekdir.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/ios.types/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios.base/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/narow.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/ios/types.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/stream.types/streamoff.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/stream.types/streamsize.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.base/version.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.requirements/iostream.limits.imbue/tested_elsewhere.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.requirements/iostreams.limits.pos/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.requirements/iostreams.threadsafety/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/iostreams.requirements/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf.reqts/tested_elsewhere.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/streambuf/types.pass.cpp delete mode 100644 libcxx/test/input.output/stream.buffers/version.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/istringstream/types.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/ostringstream/types.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/nonmember_swap.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/string.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/setbuf.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/underflow.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringbuf/types.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream.cons/default.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream.cons/move.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream.cons/move2.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream.cons/string.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream.members/str.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/stringstream/types.pass.cpp delete mode 100644 libcxx/test/input.output/string.streams/version.pass.cpp (limited to 'libcxx/test/input.output') diff --git a/libcxx/test/input.output/file.streams/c.files/cinttypes.pass.cpp b/libcxx/test/input.output/file.streams/c.files/cinttypes.pass.cpp deleted file mode 100644 index 4cb2c4c2f44..00000000000 --- a/libcxx/test/input.output/file.streams/c.files/cinttypes.pass.cpp +++ /dev/null @@ -1,929 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// test - -#include -#include - -#ifndef INT8_MIN -#error INT8_MIN not defined -#endif - -#ifndef INT16_MIN -#error INT16_MIN not defined -#endif - -#ifndef INT32_MIN -#error INT32_MIN not defined -#endif - -#ifndef INT64_MIN -#error INT64_MIN not defined -#endif - -#ifndef INT8_MAX -#error INT8_MAX not defined -#endif - -#ifndef INT16_MAX -#error INT16_MAX not defined -#endif - -#ifndef INT32_MAX -#error INT32_MAX not defined -#endif - -#ifndef INT64_MAX -#error INT64_MAX not defined -#endif - -#ifndef UINT8_MAX -#error UINT8_MAX not defined -#endif - -#ifndef UINT16_MAX -#error UINT16_MAX not defined -#endif - -#ifndef UINT32_MAX -#error UINT32_MAX not defined -#endif - -#ifndef UINT64_MAX -#error UINT64_MAX not defined -#endif - -#ifndef INT_LEAST8_MIN -#error INT_LEAST8_MIN not defined -#endif - -#ifndef INT_LEAST16_MIN -#error INT_LEAST16_MIN not defined -#endif - -#ifndef INT_LEAST32_MIN -#error INT_LEAST32_MIN not defined -#endif - -#ifndef INT_LEAST64_MIN -#error INT_LEAST64_MIN not defined -#endif - -#ifndef INT_LEAST8_MAX -#error INT_LEAST8_MAX not defined -#endif - -#ifndef INT_LEAST16_MAX -#error INT_LEAST16_MAX not defined -#endif - -#ifndef INT_LEAST32_MAX -#error INT_LEAST32_MAX not defined -#endif - -#ifndef INT_LEAST64_MAX -#error INT_LEAST64_MAX not defined -#endif - -#ifndef UINT_LEAST8_MAX -#error UINT_LEAST8_MAX not defined -#endif - -#ifndef UINT_LEAST16_MAX -#error UINT_LEAST16_MAX not defined -#endif - -#ifndef UINT_LEAST32_MAX -#error UINT_LEAST32_MAX not defined -#endif - -#ifndef UINT_LEAST64_MAX -#error UINT_LEAST64_MAX not defined -#endif - -#ifndef INT_FAST8_MIN -#error INT_FAST8_MIN not defined -#endif - -#ifndef INT_FAST16_MIN -#error INT_FAST16_MIN not defined -#endif - -#ifndef INT_FAST32_MIN -#error INT_FAST32_MIN not defined -#endif - -#ifndef INT_FAST64_MIN -#error INT_FAST64_MIN not defined -#endif - -#ifndef INT_FAST8_MAX -#error INT_FAST8_MAX not defined -#endif - -#ifndef INT_FAST16_MAX -#error INT_FAST16_MAX not defined -#endif - -#ifndef INT_FAST32_MAX -#error INT_FAST32_MAX not defined -#endif - -#ifndef INT_FAST64_MAX -#error INT_FAST64_MAX not defined -#endif - -#ifndef UINT_FAST8_MAX -#error UINT_FAST8_MAX not defined -#endif - -#ifndef UINT_FAST16_MAX -#error UINT_FAST16_MAX not defined -#endif - -#ifndef UINT_FAST32_MAX -#error UINT_FAST32_MAX not defined -#endif - -#ifndef UINT_FAST64_MAX -#error UINT_FAST64_MAX not defined -#endif - -#ifndef INTPTR_MIN -#error INTPTR_MIN not defined -#endif - -#ifndef INTPTR_MAX -#error INTPTR_MAX not defined -#endif - -#ifndef UINTPTR_MAX -#error UINTPTR_MAX not defined -#endif - -#ifndef INTMAX_MIN -#error INTMAX_MIN not defined -#endif - -#ifndef INTMAX_MAX -#error INTMAX_MAX not defined -#endif - -#ifndef UINTMAX_MAX -#error UINTMAX_MAX not defined -#endif - -#ifndef PTRDIFF_MIN -#error PTRDIFF_MIN not defined -#endif - -#ifndef PTRDIFF_MAX -#error PTRDIFF_MAX not defined -#endif - -#ifndef SIG_ATOMIC_MIN -#error SIG_ATOMIC_MIN not defined -#endif - -#ifndef SIG_ATOMIC_MAX -#error SIG_ATOMIC_MAX not defined -#endif - -#ifndef SIZE_MAX -#error SIZE_MAX not defined -#endif - -#ifndef WCHAR_MIN -#error WCHAR_MIN not defined -#endif - -#ifndef WCHAR_MAX -#error WCHAR_MAX not defined -#endif - -#ifndef WINT_MIN -#error WINT_MIN not defined -#endif - -#ifndef WINT_MAX -#error WINT_MAX not defined -#endif - -#ifndef INT8_C -#error INT8_C not defined -#endif - -#ifndef INT16_C -#error INT16_C not defined -#endif - -#ifndef INT32_C -#error INT32_C not defined -#endif - -#ifndef INT64_C -#error INT64_C not defined -#endif - -#ifndef UINT8_C -#error UINT8_C not defined -#endif - -#ifndef UINT16_C -#error UINT16_C not defined -#endif - -#ifndef UINT32_C -#error UINT32_C not defined -#endif - -#ifndef UINT64_C -#error UINT64_C not defined -#endif - -#ifndef INTMAX_C -#error INTMAX_C not defined -#endif - -#ifndef UINTMAX_C -#error UINTMAX_C not defined -#endif - -#ifndef PRId8 -#error PRId8 not defined -#endif - -#ifndef PRId16 -#error PRId16 not defined -#endif - -#ifndef PRId32 -#error PRId32 not defined -#endif - -#ifndef PRId64 -#error PRId64 not defined -#endif - -#ifndef PRIdLEAST8 -#error PRIdLEAST8 not defined -#endif - -#ifndef PRIdLEAST16 -#error PRIdLEAST16 not defined -#endif - -#ifndef PRIdLEAST32 -#error PRIdLEAST32 not defined -#endif - -#ifndef PRIdLEAST64 -#error PRIdLEAST64 not defined -#endif - -#ifndef PRIdFAST8 -#error PRIdFAST8 not defined -#endif - -#ifndef PRIdFAST16 -#error PRIdFAST16 not defined -#endif - -#ifndef PRIdFAST32 -#error PRIdFAST32 not defined -#endif - -#ifndef PRIdFAST64 -#error PRIdFAST64 not defined -#endif - -#ifndef PRIdMAX -#error PRIdMAX not defined -#endif - -#ifndef PRIdPTR -#error PRIdPTR not defined -#endif - -#ifndef PRIi8 -#error PRIi8 not defined -#endif - -#ifndef PRIi16 -#error PRIi16 not defined -#endif - -#ifndef PRIi32 -#error PRIi32 not defined -#endif - -#ifndef PRIi64 -#error PRIi64 not defined -#endif - -#ifndef PRIiLEAST8 -#error PRIiLEAST8 not defined -#endif - -#ifndef PRIiLEAST16 -#error PRIiLEAST16 not defined -#endif - -#ifndef PRIiLEAST32 -#error PRIiLEAST32 not defined -#endif - -#ifndef PRIiLEAST64 -#error PRIiLEAST64 not defined -#endif - -#ifndef PRIiFAST8 -#error PRIiFAST8 not defined -#endif - -#ifndef PRIiFAST16 -#error PRIiFAST16 not defined -#endif - -#ifndef PRIiFAST32 -#error PRIiFAST32 not defined -#endif - -#ifndef PRIiFAST64 -#error PRIiFAST64 not defined -#endif - -#ifndef PRIiMAX -#error PRIiMAX not defined -#endif - -#ifndef PRIiPTR -#error PRIiPTR not defined -#endif - -#ifndef PRIo8 -#error PRIo8 not defined -#endif - -#ifndef PRIo16 -#error PRIo16 not defined -#endif - -#ifndef PRIo32 -#error PRIo32 not defined -#endif - -#ifndef PRIo64 -#error PRIo64 not defined -#endif - -#ifndef PRIoLEAST8 -#error PRIoLEAST8 not defined -#endif - -#ifndef PRIoLEAST16 -#error PRIoLEAST16 not defined -#endif - -#ifndef PRIoLEAST32 -#error PRIoLEAST32 not defined -#endif - -#ifndef PRIoLEAST64 -#error PRIoLEAST64 not defined -#endif - -#ifndef PRIoFAST8 -#error PRIoFAST8 not defined -#endif - -#ifndef PRIoFAST16 -#error PRIoFAST16 not defined -#endif - -#ifndef PRIoFAST32 -#error PRIoFAST32 not defined -#endif - -#ifndef PRIoFAST64 -#error PRIoFAST64 not defined -#endif - -#ifndef PRIoMAX -#error PRIoMAX not defined -#endif - -#ifndef PRIoPTR -#error PRIoPTR not defined -#endif - -#ifndef PRIu8 -#error PRIu8 not defined -#endif - -#ifndef PRIu16 -#error PRIu16 not defined -#endif - -#ifndef PRIu32 -#error PRIu32 not defined -#endif - -#ifndef PRIu64 -#error PRIu64 not defined -#endif - -#ifndef PRIuLEAST8 -#error PRIuLEAST8 not defined -#endif - -#ifndef PRIuLEAST16 -#error PRIuLEAST16 not defined -#endif - -#ifndef PRIuLEAST32 -#error PRIuLEAST32 not defined -#endif - -#ifndef PRIuLEAST64 -#error PRIuLEAST64 not defined -#endif - -#ifndef PRIuFAST8 -#error PRIuFAST8 not defined -#endif - -#ifndef PRIuFAST16 -#error PRIuFAST16 not defined -#endif - -#ifndef PRIuFAST32 -#error PRIuFAST32 not defined -#endif - -#ifndef PRIuFAST64 -#error PRIuFAST64 not defined -#endif - -#ifndef PRIuMAX -#error PRIuMAX not defined -#endif - -#ifndef PRIuPTR -#error PRIuPTR not defined -#endif - -#ifndef PRIx8 -#error PRIx8 not defined -#endif - -#ifndef PRIx16 -#error PRIx16 not defined -#endif - -#ifndef PRIx32 -#error PRIx32 not defined -#endif - -#ifndef PRIx64 -#error PRIx64 not defined -#endif - -#ifndef PRIxLEAST8 -#error PRIxLEAST8 not defined -#endif - -#ifndef PRIxLEAST16 -#error PRIxLEAST16 not defined -#endif - -#ifndef PRIxLEAST32 -#error PRIxLEAST32 not defined -#endif - -#ifndef PRIxLEAST64 -#error PRIxLEAST64 not defined -#endif - -#ifndef PRIxFAST8 -#error PRIxFAST8 not defined -#endif - -#ifndef PRIxFAST16 -#error PRIxFAST16 not defined -#endif - -#ifndef PRIxFAST32 -#error PRIxFAST32 not defined -#endif - -#ifndef PRIxFAST64 -#error PRIxFAST64 not defined -#endif - -#ifndef PRIxMAX -#error PRIxMAX not defined -#endif - -#ifndef PRIxPTR -#error PRIxPTR not defined -#endif - -#ifndef PRIX8 -#error PRIX8 not defined -#endif - -#ifndef PRIX16 -#error PRIX16 not defined -#endif - -#ifndef PRIX32 -#error PRIX32 not defined -#endif - -#ifndef PRIX64 -#error PRIX64 not defined -#endif - -#ifndef PRIXLEAST8 -#error PRIXLEAST8 not defined -#endif - -#ifndef PRIXLEAST16 -#error PRIXLEAST16 not defined -#endif - -#ifndef PRIXLEAST32 -#error PRIXLEAST32 not defined -#endif - -#ifndef PRIXLEAST64 -#error PRIXLEAST64 not defined -#endif - -#ifndef PRIXFAST8 -#error PRIXFAST8 not defined -#endif - -#ifndef PRIXFAST16 -#error PRIXFAST16 not defined -#endif - -#ifndef PRIXFAST32 -#error PRIXFAST32 not defined -#endif - -#ifndef PRIXFAST64 -#error PRIXFAST64 not defined -#endif - -#ifndef PRIXMAX -#error PRIXMAX not defined -#endif - -#ifndef PRIXPTR -#error PRIXPTR not defined -#endif - -#ifndef SCNd8 -#error SCNd8 not defined -#endif - -#ifndef SCNd16 -#error SCNd16 not defined -#endif - -#ifndef SCNd32 -#error SCNd32 not defined -#endif - -#ifndef SCNd64 -#error SCNd64 not defined -#endif - -#ifndef SCNdLEAST8 -#error SCNdLEAST8 not defined -#endif - -#ifndef SCNdLEAST16 -#error SCNdLEAST16 not defined -#endif - -#ifndef SCNdLEAST32 -#error SCNdLEAST32 not defined -#endif - -#ifndef SCNdLEAST64 -#error SCNdLEAST64 not defined -#endif - -#ifndef SCNdFAST8 -#error SCNdFAST8 not defined -#endif - -#ifndef SCNdFAST16 -#error SCNdFAST16 not defined -#endif - -#ifndef SCNdFAST32 -#error SCNdFAST32 not defined -#endif - -#ifndef SCNdFAST64 -#error SCNdFAST64 not defined -#endif - -#ifndef SCNdMAX -#error SCNdMAX not defined -#endif - -#ifndef SCNdPTR -#error SCNdPTR not defined -#endif - -#ifndef SCNi8 -#error SCNi8 not defined -#endif - -#ifndef SCNi16 -#error SCNi16 not defined -#endif - -#ifndef SCNi32 -#error SCNi32 not defined -#endif - -#ifndef SCNi64 -#error SCNi64 not defined -#endif - -#ifndef SCNiLEAST8 -#error SCNiLEAST8 not defined -#endif - -#ifndef SCNiLEAST16 -#error SCNiLEAST16 not defined -#endif - -#ifndef SCNiLEAST32 -#error SCNiLEAST32 not defined -#endif - -#ifndef SCNiLEAST64 -#error SCNiLEAST64 not defined -#endif - -#ifndef SCNiFAST8 -#error SCNiFAST8 not defined -#endif - -#ifndef SCNiFAST16 -#error SCNiFAST16 not defined -#endif - -#ifndef SCNiFAST32 -#error SCNiFAST32 not defined -#endif - -#ifndef SCNiFAST64 -#error SCNiFAST64 not defined -#endif - -#ifndef SCNiMAX -#error SCNiMAX not defined -#endif - -#ifndef SCNiPTR -#error SCNiPTR not defined -#endif - -#ifndef SCNo8 -#error SCNo8 not defined -#endif - -#ifndef SCNo16 -#error SCNo16 not defined -#endif - -#ifndef SCNo32 -#error SCNo32 not defined -#endif - -#ifndef SCNo64 -#error SCNo64 not defined -#endif - -#ifndef SCNoLEAST8 -#error SCNoLEAST8 not defined -#endif - -#ifndef SCNoLEAST16 -#error SCNoLEAST16 not defined -#endif - -#ifndef SCNoLEAST32 -#error SCNoLEAST32 not defined -#endif - -#ifndef SCNoLEAST64 -#error SCNoLEAST64 not defined -#endif - -#ifndef SCNoFAST8 -#error SCNoFAST8 not defined -#endif - -#ifndef SCNoFAST16 -#error SCNoFAST16 not defined -#endif - -#ifndef SCNoFAST32 -#error SCNoFAST32 not defined -#endif - -#ifndef SCNoFAST64 -#error SCNoFAST64 not defined -#endif - -#ifndef SCNoMAX -#error SCNoMAX not defined -#endif - -#ifndef SCNoPTR -#error SCNoPTR not defined -#endif - -#ifndef SCNu8 -#error SCNu8 not defined -#endif - -#ifndef SCNu16 -#error SCNu16 not defined -#endif - -#ifndef SCNu32 -#error SCNu32 not defined -#endif - -#ifndef SCNu64 -#error SCNu64 not defined -#endif - -#ifndef SCNuLEAST8 -#error SCNuLEAST8 not defined -#endif - -#ifndef SCNuLEAST16 -#error SCNuLEAST16 not defined -#endif - -#ifndef SCNuLEAST32 -#error SCNuLEAST32 not defined -#endif - -#ifndef SCNuLEAST64 -#error SCNuLEAST64 not defined -#endif - -#ifndef SCNuFAST8 -#error SCNuFAST8 not defined -#endif - -#ifndef SCNuFAST16 -#error SCNuFAST16 not defined -#endif - -#ifndef SCNuFAST32 -#error SCNuFAST32 not defined -#endif - -#ifndef SCNuFAST64 -#error SCNuFAST64 not defined -#endif - -#ifndef SCNuMAX -#error SCNuMAX not defined -#endif - -#ifndef SCNuPTR -#error SCNuPTR not defined -#endif - -#ifndef SCNx8 -#error SCNx8 not defined -#endif - -#ifndef SCNx16 -#error SCNx16 not defined -#endif - -#ifndef SCNx32 -#error SCNx32 not defined -#endif - -#ifndef SCNx64 -#error SCNx64 not defined -#endif - -#ifndef SCNxLEAST8 -#error SCNxLEAST8 not defined -#endif - -#ifndef SCNxLEAST16 -#error SCNxLEAST16 not defined -#endif - -#ifndef SCNxLEAST32 -#error SCNxLEAST32 not defined -#endif - -#ifndef SCNxLEAST64 -#error SCNxLEAST64 not defined -#endif - -#ifndef SCNxFAST8 -#error SCNxFAST8 not defined -#endif - -#ifndef SCNxFAST16 -#error SCNxFAST16 not defined -#endif - -#ifndef SCNxFAST32 -#error SCNxFAST32 not defined -#endif - -#ifndef SCNxFAST64 -#error SCNxFAST64 not defined -#endif - -#ifndef SCNxMAX -#error SCNxMAX not defined -#endif - -#ifndef SCNxPTR -#error SCNxPTR not defined -#endif - -int main() -{ - { - std::int8_t i1 = 0; - std::int16_t i2 = 0; - std::int32_t i3 = 0; - std::int64_t i4 = 0; - } - { - std::uint8_t i1 = 0; - std::uint16_t i2 = 0; - std::uint32_t i3 = 0; - std::uint64_t i4 = 0; - } - { - std::int_least8_t i1 = 0; - std::int_least16_t i2 = 0; - std::int_least32_t i3 = 0; - std::int_least64_t i4 = 0; - } - { - std::uint_least8_t i1 = 0; - std::uint_least16_t i2 = 0; - std::uint_least32_t i3 = 0; - std::uint_least64_t i4 = 0; - } - { - std::int_fast8_t i1 = 0; - std::int_fast16_t i2 = 0; - std::int_fast32_t i3 = 0; - std::int_fast64_t i4 = 0; - } - { - std::uint_fast8_t i1 = 0; - std::uint_fast16_t i2 = 0; - std::uint_fast32_t i3 = 0; - std::uint_fast64_t i4 = 0; - } - { - std::intptr_t i1 = 0; - std::uintptr_t i2 = 0; - std::intmax_t i3 = 0; - std::uintmax_t i4 = 0; - } - { - std::imaxdiv_t i1 = {0}; - } - std::intmax_t i = 0; - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); -} diff --git a/libcxx/test/input.output/file.streams/c.files/cstdio.pass.cpp b/libcxx/test/input.output/file.streams/c.files/cstdio.pass.cpp deleted file mode 100644 index 1a60dd6b473..00000000000 --- a/libcxx/test/input.output/file.streams/c.files/cstdio.pass.cpp +++ /dev/null @@ -1,139 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// test - -#include -#include - -#ifndef BUFSIZ -#error BUFSIZ not defined -#endif - -#ifndef EOF -#error EOF not defined -#endif - -#ifndef FILENAME_MAX -#error FILENAME_MAX not defined -#endif - -#ifndef FOPEN_MAX -#error FOPEN_MAX not defined -#endif - -#ifndef L_tmpnam -#error L_tmpnam not defined -#endif - -#ifndef NULL -#error NULL not defined -#endif - -#ifndef SEEK_CUR -#error SEEK_CUR not defined -#endif - -#ifndef SEEK_END -#error SEEK_END not defined -#endif - -#ifndef SEEK_SET -#error SEEK_SET not defined -#endif - -#ifndef TMP_MAX -#error TMP_MAX not defined -#endif - -#ifndef _IOFBF -#error _IOFBF not defined -#endif - -#ifndef _IOLBF -#error _IOLBF not defined -#endif - -#ifndef _IONBF -#error _IONBF not defined -#endif - -#ifndef stderr -#error stderr not defined -#endif - -#ifndef stdin -#error stdin not defined -#endif - -#ifndef stdout -#error stdout not defined -#endif - -#include - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wformat-zero-length" - -int main() -{ - std::FILE* fp = 0; - std::fpos_t fpos = {0}; - std::size_t s = 0; - char* cp = 0; - std::va_list va; - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); -#if _LIBCPP_STD_VER <= 11 - static_assert((std::is_same::value), ""); -#endif - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); -} diff --git a/libcxx/test/input.output/file.streams/c.files/gets.fail.cpp b/libcxx/test/input.output/file.streams/c.files/gets.fail.cpp deleted file mode 100644 index 4250e23c11c..00000000000 --- a/libcxx/test/input.output/file.streams/c.files/gets.fail.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// test - -// gets - -#include - -int main() -{ -#if _LIBCPP_STD_VER > 11 - (void) std::gets((char *) NULL); -#else -#error -#endif -} diff --git a/libcxx/test/input.output/file.streams/c.files/version_ccstdio.pass.cpp b/libcxx/test/input.output/file.streams/c.files/version_ccstdio.pass.cpp deleted file mode 100644 index 0d7fc560532..00000000000 --- a/libcxx/test/input.output/file.streams/c.files/version_ccstdio.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/file.streams/c.files/version_cinttypes.pass.cpp b/libcxx/test/input.output/file.streams/c.files/version_cinttypes.pass.cpp deleted file mode 100644 index bfd379e4349..00000000000 --- a/libcxx/test/input.output/file.streams/c.files/version_cinttypes.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp deleted file mode 100644 index 86844343ecd..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_filebuf - -// void swap(basic_filebuf& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::filebuf f; - assert(f.open(temp.c_str(), std::ios_base::out | std::ios_base::in - | std::ios_base::trunc) != 0); - assert(f.is_open()); - assert(f.sputn("123", 3) == 3); - f.pubseekoff(1, std::ios_base::beg); - assert(f.sgetc() == '2'); - std::filebuf f2; - f2.swap(f); - assert(!f.is_open()); - assert(f2.is_open()); - assert(f2.sgetc() == '2'); - } - std::remove(temp.c_str()); - { - std::wfilebuf f; - assert(f.open(temp.c_str(), std::ios_base::out | std::ios_base::in - | std::ios_base::trunc) != 0); - assert(f.is_open()); - assert(f.sputn(L"123", 3) == 3); - f.pubseekoff(1, std::ios_base::beg); - assert(f.sgetc() == L'2'); - std::wfilebuf f2; - f2.swap(f); - assert(!f.is_open()); - assert(f2.is_open()); - assert(f2.sgetc() == L'2'); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp deleted file mode 100644 index a92ec872a54..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_filebuf - -// basic_filebuf& operator=(basic_filebuf&& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - std::string temp = get_temp_file_name(); - { - std::filebuf f; - assert(f.open(temp.c_str(), std::ios_base::out | std::ios_base::in - | std::ios_base::trunc) != 0); - assert(f.is_open()); - assert(f.sputn("123", 3) == 3); - f.pubseekoff(1, std::ios_base::beg); - assert(f.sgetc() == '2'); - std::filebuf f2; - f2 = move(f); - assert(!f.is_open()); - assert(f2.is_open()); - assert(f2.sgetc() == '2'); - } - std::remove(temp.c_str()); - { - std::wfilebuf f; - assert(f.open(temp.c_str(), std::ios_base::out | std::ios_base::in - | std::ios_base::trunc) != 0); - assert(f.is_open()); - assert(f.sputn(L"123", 3) == 3); - f.pubseekoff(1, std::ios_base::beg); - assert(f.sgetc() == L'2'); - std::wfilebuf f2; - f2 = move(f); - assert(!f.is_open()); - assert(f2.is_open()); - assert(f2.sgetc() == L'2'); - } - std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp deleted file mode 100644 index 084d001031d..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_filebuf - -// template -// void -// swap(basic_filebuf& x, basic_filebuf& y); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::filebuf f; - assert(f.open(temp.c_str(), std::ios_base::out | std::ios_base::in - | std::ios_base::trunc) != 0); - assert(f.is_open()); - assert(f.sputn("123", 3) == 3); - f.pubseekoff(1, std::ios_base::beg); - assert(f.sgetc() == '2'); - std::filebuf f2; - swap(f2, f); - assert(!f.is_open()); - assert(f2.is_open()); - assert(f2.sgetc() == '2'); - } - std::remove(temp.c_str()); - { - std::wfilebuf f; - assert(f.open(temp.c_str(), std::ios_base::out | std::ios_base::in - | std::ios_base::trunc) != 0); - assert(f.is_open()); - assert(f.sputn(L"123", 3) == 3); - f.pubseekoff(1, std::ios_base::beg); - assert(f.sgetc() == L'2'); - std::wfilebuf f2; - swap(f2, f); - assert(!f.is_open()); - assert(f2.is_open()); - assert(f2.sgetc() == L'2'); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.cons/default.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.cons/default.pass.cpp deleted file mode 100644 index f4fbbf69e69..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.cons/default.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_filebuf - -// basic_filebuf(); - -#include -#include - -int main() -{ - { - std::filebuf f; - assert(!f.is_open()); - } - { - std::wfilebuf f; - assert(!f.is_open()); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp deleted file mode 100644 index f13ee44700f..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_filebuf - -// basic_filebuf(basic_filebuf&& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - std::string temp = get_temp_file_name(); - { - std::filebuf f; - assert(f.open(temp.c_str(), std::ios_base::out | std::ios_base::in - | std::ios_base::trunc) != 0); - assert(f.is_open()); - assert(f.sputn("123", 3) == 3); - f.pubseekoff(1, std::ios_base::beg); - assert(f.sgetc() == '2'); - std::filebuf f2(move(f)); - assert(!f.is_open()); - assert(f2.is_open()); - assert(f2.sgetc() == '2'); - } - std::remove(temp.c_str()); - { - std::wfilebuf f; - assert(f.open(temp.c_str(), std::ios_base::out | std::ios_base::in - | std::ios_base::trunc) != 0); - assert(f.is_open()); - assert(f.sputn(L"123", 3) == 3); - f.pubseekoff(1, std::ios_base::beg); - assert(f.sgetc() == L'2'); - std::wfilebuf f2(move(f)); - assert(!f.is_open()); - assert(f2.is_open()); - assert(f2.sgetc() == L'2'); - } - std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp deleted file mode 100644 index 9d2d56782a3..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_filebuf* open(const char* s, ios_base::openmode mode); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::filebuf f; - assert(f.open(temp.c_str(), std::ios_base::out) != 0); - assert(f.is_open()); - assert(f.sputn("123", 3) == 3); - } - { - std::filebuf f; - assert(f.open(temp.c_str(), std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sbumpc() == '1'); - assert(f.sbumpc() == '2'); - assert(f.sbumpc() == '3'); - } - std::remove(temp.c_str()); - { - std::wfilebuf f; - assert(f.open(temp.c_str(), std::ios_base::out) != 0); - assert(f.is_open()); - assert(f.sputn(L"123", 3) == 3); - } - { - std::wfilebuf f; - assert(f.open(temp.c_str(), std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sbumpc() == L'1'); - assert(f.sbumpc() == L'2'); - assert(f.sbumpc() == L'3'); - } - remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp deleted file mode 100644 index 1da38569821..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp +++ /dev/null @@ -1,142 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// int_type overflow(int_type c = traits::eof()); - -// This test is not entirely portable - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct test_buf - : public std::basic_filebuf -{ - typedef std::basic_filebuf base; - typedef typename base::char_type char_type; - typedef typename base::int_type int_type; - typedef typename base::traits_type traits_type; - - char_type* pbase() const {return base::pbase();} - char_type* pptr() const {return base::pptr();} - char_type* epptr() const {return base::epptr();} - void gbump(int n) {base::gbump(n);} - - virtual int_type overflow(int_type c = traits_type::eof()) {return base::overflow(c);} -}; - -int main() -{ - { - test_buf f; - assert(f.open("overflow.dat", std::ios_base::out) != 0); - assert(f.is_open()); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - assert(f.overflow('a') == 'a'); - assert(f.pbase() != 0); - assert(f.pptr() == f.pbase()); - assert(f.epptr() - f.pbase() == 4095); - } - { - test_buf f; - assert(f.open("overflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sgetc() == 'a'); - } - std::remove("overflow.dat"); - { - test_buf f; - f.pubsetbuf(0, 0); - assert(f.open("overflow.dat", std::ios_base::out) != 0); - assert(f.is_open()); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - assert(f.overflow('a') == 'a'); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - } - { - test_buf f; - assert(f.open("overflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sgetc() == 'a'); - } - std::remove("overflow.dat"); - { - test_buf f; - assert(f.open("overflow.dat", std::ios_base::out) != 0); - assert(f.is_open()); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - assert(f.overflow(L'a') == L'a'); - assert(f.pbase() != 0); - assert(f.pptr() == f.pbase()); - assert(f.epptr() - f.pbase() == 4095); - } - { - test_buf f; - assert(f.open("overflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sgetc() == L'a'); - } - std::remove("overflow.dat"); - { - test_buf f; - f.pubsetbuf(0, 0); - assert(f.open("overflow.dat", std::ios_base::out) != 0); - assert(f.is_open()); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - assert(f.overflow(L'a') == L'a'); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - } - { - test_buf f; - assert(f.open("overflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sgetc() == L'a'); - } - std::remove("overflow.dat"); - { - test_buf f; - f.pubimbue(std::locale(LOCALE_en_US_UTF_8)); - assert(f.open("overflow.dat", std::ios_base::out) != 0); - assert(f.sputc(0x4E51) == 0x4E51); - assert(f.sputc(0x4E52) == 0x4E52); - assert(f.sputc(0x4E53) == 0x4E53); - } - { - test_buf f; - assert(f.open("overflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sbumpc() == 0xE4); - assert(f.sbumpc() == 0xB9); - assert(f.sbumpc() == 0x91); - assert(f.sbumpc() == 0xE4); - assert(f.sbumpc() == 0xB9); - assert(f.sbumpc() == 0x92); - assert(f.sbumpc() == 0xE4); - assert(f.sbumpc() == 0xB9); - assert(f.sbumpc() == 0x93); - assert(f.sbumpc() == -1); - } - std::remove("overflow.dat"); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp deleted file mode 100644 index 4419cb51a6d..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// int_type pbackfail(int_type c = traits::eof()); - -// This test is not entirely portable - -#include -#include - -template -struct test_buf - : public std::basic_filebuf -{ - typedef std::basic_filebuf base; - typedef typename base::char_type char_type; - typedef typename base::int_type int_type; - typedef typename base::traits_type traits_type; - - char_type* eback() const {return base::eback();} - char_type* gptr() const {return base::gptr();} - char_type* egptr() const {return base::egptr();} - void gbump(int n) {base::gbump(n);} - - virtual int_type pbackfail(int_type c = traits_type::eof()) {return base::pbackfail(c);} -}; - -int main() -{ - { - test_buf f; - assert(f.open("underflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sbumpc() == '1'); - assert(f.sgetc() == '2'); - assert(f.pbackfail('a') == -1); - } - { - test_buf f; - assert(f.open("underflow.dat", std::ios_base::in | std::ios_base::out) != 0); - assert(f.is_open()); - assert(f.sbumpc() == '1'); - assert(f.sgetc() == '2'); - assert(f.pbackfail('a') == 'a'); - assert(f.sbumpc() == 'a'); - assert(f.sgetc() == '2'); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp deleted file mode 100644 index eb15facad5b..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp +++ /dev/null @@ -1,66 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// pos_type seekoff(off_type off, ios_base::seekdir way, -// ios_base::openmode which = ios_base::in | ios_base::out); -// pos_type seekpos(pos_type sp, -// ios_base::openmode which = ios_base::in | ios_base::out); - -// This test is not entirely portable - -#include -#include - -int main() -{ - { - char buf[10]; - typedef std::filebuf::pos_type pos_type; - std::filebuf f; - f.pubsetbuf(buf, sizeof(buf)); - assert(f.open("seekoff.dat", std::ios_base::in | std::ios_base::out - | std::ios_base::trunc) != 0); - assert(f.is_open()); - f.sputn("abcdefghijklmnopqrstuvwxyz", 26); - assert(buf[0] == 'v'); - pos_type p = f.pubseekoff(-15, std::ios_base::cur); - assert(p == 11); - assert(f.sgetc() == 'l'); - f.pubseekoff(0, std::ios_base::beg); - assert(f.sgetc() == 'a'); - f.pubseekoff(-1, std::ios_base::end); - assert(f.sgetc() == 'z'); - assert(f.pubseekpos(p) == p); - assert(f.sgetc() == 'l'); - } - std::remove("seekoff.dat"); - { - wchar_t buf[10]; - typedef std::filebuf::pos_type pos_type; - std::wfilebuf f; - f.pubsetbuf(buf, sizeof(buf)/sizeof(buf[0])); - assert(f.open("seekoff.dat", std::ios_base::in | std::ios_base::out - | std::ios_base::trunc) != 0); - assert(f.is_open()); - f.sputn(L"abcdefghijklmnopqrstuvwxyz", 26); - assert(buf[0] == L'v'); - pos_type p = f.pubseekoff(-15, std::ios_base::cur); - assert(p == 11); - assert(f.sgetc() == L'l'); - f.pubseekoff(0, std::ios_base::beg); - assert(f.sgetc() == L'a'); - f.pubseekoff(-1, std::ios_base::end); - assert(f.sgetc() == L'z'); - assert(f.pubseekpos(p) == p); - assert(f.sgetc() == L'l'); - } - std::remove("seekoff.dat"); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.dat b/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.dat deleted file mode 100644 index e2e107ac61a..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.dat +++ /dev/null @@ -1 +0,0 @@ -123456789 \ No newline at end of file diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp deleted file mode 100644 index e34bc844bd2..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp +++ /dev/null @@ -1,121 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// int_type underflow(); - -// This test is not entirely portable - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct test_buf - : public std::basic_filebuf -{ - typedef std::basic_filebuf base; - typedef typename base::char_type char_type; - typedef typename base::int_type int_type; - - char_type* eback() const {return base::eback();} - char_type* gptr() const {return base::gptr();} - char_type* egptr() const {return base::egptr();} - void gbump(int n) {base::gbump(n);} - - virtual int_type underflow() {return base::underflow();} -}; - -int main() -{ - { - test_buf f; - assert(f.open("underflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.eback() == 0); - assert(f.gptr() == 0); - assert(f.egptr() == 0); - assert(f.underflow() == '1'); - assert(f.eback() != 0); - assert(f.eback() == f.gptr()); - assert(*f.gptr() == '1'); - assert(f.egptr() - f.eback() == 9); - } - { - test_buf f; - assert(f.open("underflow.dat", std::ios_base::in) != 0); - assert(f.pubsetbuf(0, 0)); - assert(f.is_open()); - assert(f.eback() == 0); - assert(f.gptr() == 0); - assert(f.egptr() == 0); - assert(f.underflow() == '1'); - assert(f.eback() != 0); - assert(f.eback() == f.gptr()); - assert(*f.gptr() == '1'); - assert(f.egptr() - f.eback() == 8); - f.gbump(8); - assert(f.sgetc() == '9'); - assert(f.eback()[0] == '5'); - assert(f.eback()[1] == '6'); - assert(f.eback()[2] == '7'); - assert(f.eback()[3] == '8'); - assert(f.gptr() - f.eback() == 4); - assert(*f.gptr() == '9'); - assert(f.egptr() - f.gptr() == 1); - } - { - test_buf f; - assert(f.open("underflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.eback() == 0); - assert(f.gptr() == 0); - assert(f.egptr() == 0); - assert(f.underflow() == L'1'); - assert(f.eback() != 0); - assert(f.eback() == f.gptr()); - assert(*f.gptr() == L'1'); - assert(f.egptr() - f.eback() == 9); - } - { - test_buf f; - assert(f.pubsetbuf(0, 0)); - assert(f.open("underflow.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.eback() == 0); - assert(f.gptr() == 0); - assert(f.egptr() == 0); - assert(f.underflow() == L'1'); - assert(f.eback() != 0); - assert(f.eback() == f.gptr()); - assert(*f.gptr() == L'1'); - assert(f.egptr() - f.eback() == 8); - f.gbump(8); - assert(f.sgetc() == L'9'); - assert(f.eback()[0] == L'5'); - assert(f.eback()[1] == L'6'); - assert(f.eback()[2] == L'7'); - assert(f.eback()[3] == L'8'); - assert(f.gptr() - f.eback() == 4); - assert(*f.gptr() == L'9'); - assert(f.egptr() - f.gptr() == 1); - } - { - test_buf f; - f.pubimbue(std::locale(LOCALE_en_US_UTF_8)); - assert(f.open("underflow_utf8.dat", std::ios_base::in) != 0); - assert(f.is_open()); - assert(f.sbumpc() == 0x4E51); - assert(f.sbumpc() == 0x4E52); - assert(f.sbumpc() == 0x4E53); - assert(f.sbumpc() == -1); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow_utf8.dat b/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow_utf8.dat deleted file mode 100644 index ee7063e1207..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow_utf8.dat +++ /dev/null @@ -1 +0,0 @@ -乑乒乓 \ No newline at end of file diff --git a/libcxx/test/input.output/file.streams/fstreams/filebuf/types.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/filebuf/types.pass.cpp deleted file mode 100644 index 5d77e0054b7..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/filebuf/types.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_filebuf -// : public basic_streambuf -// { -// public: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_filebuf >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp deleted file mode 100644 index fcc86a13ffa..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,71 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// void swap(basic_fstream& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp1 = get_temp_file_name(); - std::string temp2 = get_temp_file_name(); - { - std::fstream fs1(temp1.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - std::fstream fs2(temp2.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - fs1 << 1 << ' ' << 2; - fs2 << 2 << ' ' << 1; - fs1.seekg(0); - fs1.swap(fs2); - fs1.seekg(0); - int i; - fs1 >> i; - assert(i == 2); - fs1 >> i; - assert(i == 1); - i = 0; - fs2 >> i; - assert(i == 1); - fs2 >> i; - assert(i == 2); - } - std::remove(temp1.c_str()); - std::remove(temp2.c_str()); - { - std::wfstream fs1(temp1.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - std::wfstream fs2(temp2.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - fs1 << 1 << ' ' << 2; - fs2 << 2 << ' ' << 1; - fs1.seekg(0); - fs1.swap(fs2); - fs1.seekg(0); - int i; - fs1 >> i; - assert(i == 2); - fs1 >> i; - assert(i == 1); - i = 0; - fs2 >> i; - assert(i == 1); - fs2 >> i; - assert(i == 2); - } - std::remove(temp1.c_str()); - std::remove(temp2.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp deleted file mode 100644 index b5157e90edc..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// basic_fstream& operator=(basic_fstream&& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - std::string temp = get_temp_file_name(); - { - std::fstream fso(temp.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - std::fstream fs; - fs = move(fso); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wfstream fso(temp.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - std::wfstream fs; - fs = move(fso); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp deleted file mode 100644 index 0a4f7240daa..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp +++ /dev/null @@ -1,72 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// template -// void swap(basic_fstream& x, basic_fstream& y); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp1 = get_temp_file_name(); - std::string temp2 = get_temp_file_name(); - { - std::fstream fs1(temp1.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - std::fstream fs2(temp2.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - fs1 << 1 << ' ' << 2; - fs2 << 2 << ' ' << 1; - fs1.seekg(0); - swap(fs1, fs2); - fs1.seekg(0); - int i; - fs1 >> i; - assert(i == 2); - fs1 >> i; - assert(i == 1); - i = 0; - fs2 >> i; - assert(i == 1); - fs2 >> i; - assert(i == 2); - } - std::remove(temp1.c_str()); - std::remove(temp2.c_str()); - { - std::wfstream fs1(temp1.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - std::wfstream fs2(temp2.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - fs1 << 1 << ' ' << 2; - fs2 << 2 << ' ' << 1; - fs1.seekg(0); - swap(fs1, fs2); - fs1.seekg(0); - int i; - fs1 >> i; - assert(i == 2); - fs1 >> i; - assert(i == 1); - i = 0; - fs2 >> i; - assert(i == 1); - fs2 >> i; - assert(i == 2); - } - std::remove(temp1.c_str()); - std::remove(temp2.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.cons/default.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.cons/default.pass.cpp deleted file mode 100644 index cfd5a031f0f..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.cons/default.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// basic_fstream(); - -#include -#include - -int main() -{ - { - std::fstream fs; - } - { - std::wfstream fs; - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp deleted file mode 100644 index d2ae3028606..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// basic_fstream(basic_fstream&& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - std::string temp = get_temp_file_name(); - { - std::fstream fso(temp, std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - std::fstream fs = move(fso); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wfstream fso(temp, std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - std::wfstream fs = move(fso); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp deleted file mode 100644 index 06a6b77943a..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// explicit basic_fstream(const char* s, ios_base::openmode mode = ios_base::in | ios_base::out); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::fstream fs(temp.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wfstream fs(temp.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp deleted file mode 100644 index 4b0819f8af4..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// explicit basic_fstream(const string& s, ios_base::openmode mode = ios_base::in|ios_base::out); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::fstream fs(temp, - std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wfstream fs(temp, - std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp deleted file mode 100644 index 0e4bc7177b8..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// void close(); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::fstream fs; - assert(!fs.is_open()); - fs.open(temp.c_str(), std::ios_base::out); - assert(fs.is_open()); - fs.close(); - assert(!fs.is_open()); - } - std::remove(temp.c_str()); - { - std::wfstream fs; - assert(!fs.is_open()); - fs.open(temp.c_str(), std::ios_base::out); - assert(fs.is_open()); - fs.close(); - assert(!fs.is_open()); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp deleted file mode 100644 index 231bb82c743..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// void open(const char* s, ios_base::openmode mode = ios_base::in|ios_base::out); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::fstream fs; - assert(!fs.is_open()); - fs.open(temp.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - assert(fs.is_open()); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wfstream fs; - assert(!fs.is_open()); - fs.open(temp.c_str(), std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - assert(fs.is_open()); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp deleted file mode 100644 index 182f12c47d1..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// void open(const string& s, ios_base::openmode mode = ios_base::in|ios_base::out); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::fstream fs; - assert(!fs.is_open()); - fs.open(temp, std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - assert(fs.is_open()); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wfstream fs; - assert(!fs.is_open()); - fs.open(temp, std::ios_base::in | std::ios_base::out - | std::ios_base::trunc); - assert(fs.is_open()); - double x = 0; - fs << 3.25; - fs.seekg(0); - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.members/rdbuf.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.members/rdbuf.pass.cpp deleted file mode 100644 index d8398326910..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.members/rdbuf.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream - -// basic_filebuf* rdbuf() const; - -#include -#include - -int main() -{ - { - std::fstream fs; - assert(fs.rdbuf()); - } - { - std::wfstream fs; - assert(fs.rdbuf()); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream/types.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream/types.pass.cpp deleted file mode 100644 index 6ced241f75f..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/fstream/types.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_fstream -// : public basic_iostream -// { -// public: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_fstream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp deleted file mode 100644 index 18443cedb8d..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// void swap(basic_ifstream& rhs); - -#include -#include - -int main() -{ - { - std::ifstream fs1("test.dat"); - std::ifstream fs2("test2.dat"); - fs1.swap(fs2); - double x = 0; - fs1 >> x; - assert(x == 4.5); - fs2 >> x; - assert(x == 3.25); - } - { - std::wifstream fs1("test.dat"); - std::wifstream fs2("test2.dat"); - fs1.swap(fs2); - double x = 0; - fs1 >> x; - assert(x == 4.5); - fs2 >> x; - assert(x == 3.25); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp deleted file mode 100644 index 9c2fcad33a3..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// basic_ifstream& operator=(basic_ifstream&& rhs); - -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::ifstream fso("test.dat"); - std::ifstream fs; - fs = move(fso); - double x = 0; - fs >> x; - assert(x == 3.25); - } - { - std::wifstream fso("test.dat"); - std::wifstream fs; - fs = move(fso); - double x = 0; - fs >> x; - assert(x == 3.25); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp deleted file mode 100644 index 5700720a064..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// template -// void swap(basic_ifstream& x, basic_ifstream& y); - -#include -#include - -int main() -{ - { - std::ifstream fs1("test.dat"); - std::ifstream fs2("test2.dat"); - swap(fs1, fs2); - double x = 0; - fs1 >> x; - assert(x == 4.5); - fs2 >> x; - assert(x == 3.25); - } - { - std::wifstream fs1("test.dat"); - std::wifstream fs2("test2.dat"); - swap(fs1, fs2); - double x = 0; - fs1 >> x; - assert(x == 4.5); - fs2 >> x; - assert(x == 3.25); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/test.dat b/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/test.dat deleted file mode 100644 index 64064d34a8e..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/test.dat +++ /dev/null @@ -1 +0,0 @@ -3.25 \ No newline at end of file diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/test2.dat b/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/test2.dat deleted file mode 100644 index 958d30d86d0..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.assign/test2.dat +++ /dev/null @@ -1 +0,0 @@ -4.5 \ No newline at end of file diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/default.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/default.pass.cpp deleted file mode 100644 index 41e6780e807..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/default.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// basic_ifstream(); - -#include -#include - -int main() -{ - { - std::ifstream fs; - } - { - std::wifstream fs; - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp deleted file mode 100644 index aaac1212262..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// basic_ifstream(basic_ifstream&& rhs); - -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::ifstream fso("test.dat"); - std::ifstream fs = move(fso); - double x = 0; - fs >> x; - assert(x == 3.25); - } - { - std::wifstream fso("test.dat"); - std::wifstream fs = move(fso); - double x = 0; - fs >> x; - assert(x == 3.25); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp deleted file mode 100644 index f43df3c9f84..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// explicit basic_ifstream(const char* s, ios_base::openmode mode = ios_base::in); - -#include -#include - -int main() -{ - { - std::ifstream fs("test.dat"); - double x = 0; - fs >> x; - assert(x == 3.25); - } - { - std::ifstream fs("test.dat", std::ios_base::out); - double x = 0; - fs >> x; - assert(x == 3.25); - } - { - std::wifstream fs("test.dat"); - double x = 0; - fs >> x; - assert(x == 3.25); - } - { - std::wifstream fs("test.dat", std::ios_base::out); - double x = 0; - fs >> x; - assert(x == 3.25); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp deleted file mode 100644 index ad5fe5149df..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// explicit basic_ifstream(const string& s, ios_base::openmode mode = ios_base::in); - -#include -#include - -int main() -{ - { - std::ifstream fs(std::string("test.dat")); - double x = 0; - fs >> x; - assert(x == 3.25); - } - { - std::ifstream fs(std::string("test.dat"), std::ios_base::out); - double x = 0; - fs >> x; - assert(x == 3.25); - } - { - std::wifstream fs(std::string("test.dat")); - double x = 0; - fs >> x; - assert(x == 3.25); - } - { - std::wifstream fs(std::string("test.dat"), std::ios_base::out); - double x = 0; - fs >> x; - assert(x == 3.25); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/test.dat b/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/test.dat deleted file mode 100644 index 64064d34a8e..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.cons/test.dat +++ /dev/null @@ -1 +0,0 @@ -3.25 \ No newline at end of file diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp deleted file mode 100644 index 3e393324085..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// void close(); - -#include -#include - -int main() -{ - { - std::ifstream fs; - assert(!fs.is_open()); - fs.open("test.dat"); - assert(fs.is_open()); - fs.close(); - assert(!fs.is_open()); - } - { - std::wifstream fs; - assert(!fs.is_open()); - fs.open("test.dat"); - assert(fs.is_open()); - fs.close(); - assert(!fs.is_open()); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp deleted file mode 100644 index 47dc85fac60..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// void open(const char* s, ios_base::openmode mode = ios_base::in); - -#include -#include - -int main() -{ - { - std::ifstream fs; - assert(!fs.is_open()); - char c = 'a'; - fs >> c; - assert(fs.fail()); - assert(c == 'a'); - fs.open("test.dat"); - assert(fs.is_open()); - fs >> c; - assert(c == 'r'); - } - { - std::wifstream fs; - assert(!fs.is_open()); - wchar_t c = L'a'; - fs >> c; - assert(fs.fail()); - assert(c == L'a'); - fs.open("test.dat"); - assert(fs.is_open()); - fs >> c; - assert(c == L'r'); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp deleted file mode 100644 index 619694e2736..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// void open(const string& s, ios_base::openmode mode = ios_base::in); - -#include -#include - -int main() -{ - { - std::ifstream fs; - assert(!fs.is_open()); - char c = 'a'; - fs >> c; - assert(fs.fail()); - assert(c == 'a'); - fs.open(std::string("test.dat")); - assert(fs.is_open()); - fs >> c; - assert(c == 'r'); - } - { - std::wifstream fs; - assert(!fs.is_open()); - wchar_t c = L'a'; - fs >> c; - assert(fs.fail()); - assert(c == L'a'); - fs.open(std::string("test.dat")); - assert(fs.is_open()); - fs >> c; - assert(c == L'r'); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp deleted file mode 100644 index 53fd294e71f..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream - -// basic_filebuf* rdbuf() const; - -#include -#include - -int main() -{ - { - std::ifstream fs("test.dat"); - std::filebuf* fb = fs.rdbuf(); - assert(fb->sgetc() == 'r'); - } - { - std::wifstream fs("test.dat"); - std::wfilebuf* fb = fs.rdbuf(); - assert(fb->sgetc() == L'r'); - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/test.dat b/libcxx/test/input.output/file.streams/fstreams/ifstream.members/test.dat deleted file mode 100644 index 1d2f01491f7..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream.members/test.dat +++ /dev/null @@ -1 +0,0 @@ -r \ No newline at end of file diff --git a/libcxx/test/input.output/file.streams/fstreams/ifstream/types.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ifstream/types.pass.cpp deleted file mode 100644 index dd39eee1a17..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ifstream/types.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ifstream -// : public basic_istream -// { -// public: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_ifstream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp deleted file mode 100644 index 519b84fb1ab..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// void swap(basic_ofstream& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp1 = get_temp_file_name(); - std::string temp2 = get_temp_file_name(); - { - std::ofstream fs1(temp1.c_str()); - std::ofstream fs2(temp2.c_str()); - fs1 << 3.25; - fs2 << 4.5; - fs1.swap(fs2); - fs1 << ' ' << 3.25; - fs2 << ' ' << 4.5; - } - { - std::ifstream fs(temp1.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - fs >> x; - assert(x == 4.5); - } - std::remove(temp1.c_str()); - { - std::ifstream fs(temp2.c_str()); - double x = 0; - fs >> x; - assert(x == 4.5); - fs >> x; - assert(x == 3.25); - } - std::remove(temp2.c_str()); - { - std::wofstream fs1(temp1.c_str()); - std::wofstream fs2(temp2.c_str()); - fs1 << 3.25; - fs2 << 4.5; - fs1.swap(fs2); - fs1 << ' ' << 3.25; - fs2 << ' ' << 4.5; - } - { - std::wifstream fs(temp1.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - fs >> x; - assert(x == 4.5); - } - std::remove(temp1.c_str()); - { - std::wifstream fs(temp2.c_str()); - double x = 0; - fs >> x; - assert(x == 4.5); - fs >> x; - assert(x == 3.25); - } - std::remove(temp2.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp deleted file mode 100644 index 0f21eb81d07..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// basic_ofstream& operator=(basic_ofstream&& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - std::string temp = get_temp_file_name(); - { - std::ofstream fso(temp.c_str()); - std::ofstream fs; - fs = move(fso); - fs << 3.25; - } - { - std::ifstream fs(temp.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wofstream fso(temp.c_str()); - std::wofstream fs; - fs = move(fso); - fs << 3.25; - } - { - std::wifstream fs(temp.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp deleted file mode 100644 index d58f5f25600..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp +++ /dev/null @@ -1,80 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// template -// void swap(basic_ofstream& x, basic_ofstream& y); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp1 = get_temp_file_name(); - std::string temp2 = get_temp_file_name(); - { - std::ofstream fs1(temp1.c_str()); - std::ofstream fs2(temp2.c_str()); - fs1 << 3.25; - fs2 << 4.5; - swap(fs1, fs2); - fs1 << ' ' << 3.25; - fs2 << ' ' << 4.5; - } - { - std::ifstream fs(temp1.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - fs >> x; - assert(x == 4.5); - } - std::remove(temp1.c_str()); - { - std::ifstream fs(temp2.c_str()); - double x = 0; - fs >> x; - assert(x == 4.5); - fs >> x; - assert(x == 3.25); - } - std::remove(temp2.c_str()); - { - std::wofstream fs1(temp1.c_str()); - std::wofstream fs2(temp2.c_str()); - fs1 << 3.25; - fs2 << 4.5; - swap(fs1, fs2); - fs1 << ' ' << 3.25; - fs2 << ' ' << 4.5; - } - { - std::wifstream fs(temp1.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - fs >> x; - assert(x == 4.5); - } - std::remove(temp1.c_str()); - { - std::wifstream fs(temp2.c_str()); - double x = 0; - fs >> x; - assert(x == 4.5); - fs >> x; - assert(x == 3.25); - } - std::remove(temp2.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp deleted file mode 100644 index f8308ab06bf..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// basic_ofstream(); - -#include -#include - -int main() -{ - { - std::ofstream fs; - } - { - std::wofstream fs; - } -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp deleted file mode 100644 index 8645358cbd4..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// basic_ofstream(basic_ofstream&& rhs); - -#include -#include -#include "platform_support.h" - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - std::string temp = get_temp_file_name(); - { - std::ofstream fso(temp.c_str()); - std::ofstream fs = move(fso); - fs << 3.25; - } - { - std::ifstream fs(temp.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wofstream fso(temp.c_str()); - std::wofstream fs = move(fso); - fs << 3.25; - } - { - std::wifstream fs(temp.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp deleted file mode 100644 index bd5832abeb5..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// explicit basic_ofstream(const char* s, ios_base::openmode mode = ios_base::out); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::ofstream fs(temp.c_str()); - fs << 3.25; - } - { - std::ifstream fs(temp.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wofstream fs(temp.c_str()); - fs << 3.25; - } - { - std::wifstream fs(temp.c_str()); - double x = 0; - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp deleted file mode 100644 index 7112b17fb8b..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// explicit basic_ofstream(const string& s, ios_base::openmode mode = ios_base::out); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::ofstream fs(temp); - fs << 3.25; - } - { - std::ifstream fs(temp); - double x = 0; - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); - { - std::wofstream fs(temp); - fs << 3.25; - } - { - std::wifstream fs(temp); - double x = 0; - fs >> x; - assert(x == 3.25); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/close.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.members/close.pass.cpp deleted file mode 100644 index b8c358d8ece..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/close.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// void close(); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::ofstream fs; - assert(!fs.is_open()); - fs.open(temp.c_str()); - assert(fs.is_open()); - fs.close(); - assert(!fs.is_open()); - } - std::remove(temp.c_str()); - { - std::wofstream fs; - assert(!fs.is_open()); - fs.open(temp.c_str()); - assert(fs.is_open()); - fs.close(); - assert(!fs.is_open()); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp deleted file mode 100644 index e5cddc9e164..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// void open(const char* s, ios_base::openmode mode = ios_base::out); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::ofstream fs; - assert(!fs.is_open()); - char c = 'a'; - fs << c; - assert(fs.fail()); - fs.open(temp.c_str()); - assert(fs.is_open()); - fs << c; - } - { - std::ifstream fs(temp.c_str()); - char c = 0; - fs >> c; - assert(c == 'a'); - } - std::remove(temp.c_str()); - { - std::wofstream fs; - assert(!fs.is_open()); - wchar_t c = L'a'; - fs << c; - assert(fs.fail()); - fs.open(temp.c_str()); - assert(fs.is_open()); - fs << c; - } - { - std::wifstream fs(temp.c_str()); - wchar_t c = 0; - fs >> c; - assert(c == L'a'); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp deleted file mode 100644 index d54aa1824ab..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// void open(const string& s, ios_base::openmode mode = ios_base::out); - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::ofstream fs; - assert(!fs.is_open()); - char c = 'a'; - fs << c; - assert(fs.fail()); - fs.open(temp); - assert(fs.is_open()); - fs << c; - } - { - std::ifstream fs(temp.c_str()); - char c = 0; - fs >> c; - assert(c == 'a'); - } - std::remove(temp.c_str()); - { - std::wofstream fs; - assert(!fs.is_open()); - wchar_t c = L'a'; - fs << c; - assert(fs.fail()); - fs.open(temp); - assert(fs.is_open()); - fs << c; - } - { - std::wifstream fs(temp.c_str()); - wchar_t c = 0; - fs >> c; - assert(c == L'a'); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp deleted file mode 100644 index d707e0a32ac..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream - -// basic_filebuf* rdbuf() const; - -#include -#include -#include "platform_support.h" - -int main() -{ - std::string temp = get_temp_file_name(); - { - std::ofstream fs(temp.c_str()); - std::filebuf* fb = fs.rdbuf(); - assert(fb->sputc('r') == 'r'); - } - std::remove(temp.c_str()); - { - std::wofstream fs(temp.c_str()); - std::wfilebuf* fb = fs.rdbuf(); - assert(fb->sputc(L'r') == L'r'); - } - std::remove(temp.c_str()); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream/types.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream/types.pass.cpp deleted file mode 100644 index 243994addcc..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream/types.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ofstream -// : public basic_ostream -// { -// public: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_ofstream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/file.streams/fstreams/version.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/version.pass.cpp deleted file mode 100644 index 44b85141680..00000000000 --- a/libcxx/test/input.output/file.streams/fstreams/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/file.streams/nothing_to_do.pass.cpp b/libcxx/test/input.output/file.streams/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/file.streams/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/input.output.general/nothing_to_do.pass.cpp b/libcxx/test/input.output/input.output.general/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/input.output.general/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/ext.manip/get_money.pass.cpp b/libcxx/test/input.output/iostream.format/ext.manip/get_money.pass.cpp deleted file mode 100644 index 1ea1d780c50..00000000000 --- a/libcxx/test/input.output/iostream.format/ext.manip/get_money.pass.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template T7 get_money(moneyT& mon, bool intl = false); - -// REQUIRES: locale.en_US.UTF-8 - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } -}; - -int main() -{ - { - testbuf sb(" -$1,234,567.89"); - std::istream is(&sb); - is.imbue(std::locale(LOCALE_en_US_UTF_8)); - long double x = 0; - is >> std::get_money(x, false); - assert(x == -123456789); - } - { - testbuf sb(" -USD 1,234,567.89"); - std::istream is(&sb); - is.imbue(std::locale(LOCALE_en_US_UTF_8)); - long double x = 0; - is >> std::get_money(x, true); - assert(x == -123456789); - } - { - testbuf sb(L" -$1,234,567.89"); - std::wistream is(&sb); - is.imbue(std::locale(LOCALE_en_US_UTF_8)); - long double x = 0; - is >> std::get_money(x, false); - assert(x == -123456789); - } - { - testbuf sb(L" -USD 1,234,567.89"); - std::wistream is(&sb); - is.imbue(std::locale(LOCALE_en_US_UTF_8)); - long double x = 0; - is >> std::get_money(x, true); - assert(x == -123456789); - } -} diff --git a/libcxx/test/input.output/iostream.format/ext.manip/get_time.pass.cpp b/libcxx/test/input.output/iostream.format/ext.manip/get_time.pass.cpp deleted file mode 100644 index 17ff642dc46..00000000000 --- a/libcxx/test/input.output/iostream.format/ext.manip/get_time.pass.cpp +++ /dev/null @@ -1,73 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template T9 get_time(struct tm* tmb, const charT* fmt); - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } -}; - -int main() -{ - { - testbuf sb(" Sat Dec 31 23:55:59 2061"); - std::istream is(&sb); - is.imbue(std::locale(LOCALE_en_US_UTF_8)); - std::tm t = {0}; - is >> std::get_time(&t, "%a %b %d %H:%M:%S %Y"); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" Sat Dec 31 23:55:59 2061"); - std::wistream is(&sb); - is.imbue(std::locale(LOCALE_en_US_UTF_8)); - std::tm t = {0}; - is >> std::get_time(&t, L"%a %b %d %H:%M:%S %Y"); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/ext.manip/put_money.pass.cpp b/libcxx/test/input.output/iostream.format/ext.manip/put_money.pass.cpp deleted file mode 100644 index a00cf139be9..00000000000 --- a/libcxx/test/input.output/iostream.format/ext.manip/put_money.pass.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template T8 put_money(const moneyT& mon, bool intl = false); - -// REQUIRES: locale.en_US.UTF-8 - -#include -#include - -#include "platform_support.h" // locale name macros - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - os.imbue(std::locale(LOCALE_en_US_UTF_8)); - showbase(os); - long double x = -123456789; - os << std::put_money(x, false); - assert(sb.str() == "-$1,234,567.89"); - } - { - testbuf sb; - std::ostream os(&sb); - os.imbue(std::locale(LOCALE_en_US_UTF_8)); - showbase(os); - long double x = -123456789; - os << std::put_money(x, true); - assert(sb.str() == "-USD 1,234,567.89"); - } - { - testbuf sb; - std::wostream os(&sb); - os.imbue(std::locale(LOCALE_en_US_UTF_8)); - showbase(os); - long double x = -123456789; - os << std::put_money(x, false); - assert(sb.str() == L"-$1,234,567.89"); - } - { - testbuf sb; - std::wostream os(&sb); - os.imbue(std::locale(LOCALE_en_US_UTF_8)); - showbase(os); - long double x = -123456789; - os << std::put_money(x, true); - assert(sb.str() == L"-USD 1,234,567.89"); - } -} diff --git a/libcxx/test/input.output/iostream.format/ext.manip/put_time.pass.cpp b/libcxx/test/input.output/iostream.format/ext.manip/put_time.pass.cpp deleted file mode 100644 index 52a98a1b568..00000000000 --- a/libcxx/test/input.output/iostream.format/ext.manip/put_time.pass.cpp +++ /dev/null @@ -1,84 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template T10 put_time(const struct tm* tmb, const charT* fmt); - -#include -#include - -#include "platform_support.h" // locale name macros - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - os.imbue(std::locale(LOCALE_en_US_UTF_8)); - std::tm t = {0}; - t.tm_sec = 59; - t.tm_min = 55; - t.tm_hour = 23; - t.tm_mday = 31; - t.tm_mon = 11; - t.tm_year = 161; - t.tm_wday = 6; - t.tm_isdst = 0; - os << std::put_time(&t, "%a %b %d %H:%M:%S %Y"); - assert(sb.str() == "Sat Dec 31 23:55:59 2061"); - } - { - testbuf sb; - std::wostream os(&sb); - os.imbue(std::locale(LOCALE_en_US_UTF_8)); - std::tm t = {0}; - t.tm_sec = 59; - t.tm_min = 55; - t.tm_hour = 23; - t.tm_mday = 31; - t.tm_mon = 11; - t.tm_year = 161; - t.tm_wday = 6; - os << std::put_time(&t, L"%a %b %d %H:%M:%S %Y"); - assert(sb.str() == L"Sat Dec 31 23:55:59 2061"); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp deleted file mode 100644 index f4d425728b7..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_iostream; - -// void swap(basic_iostream& rhs); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_iostream - : public std::basic_iostream -{ - typedef std::basic_iostream base; - test_iostream(testbuf* sb) : base(sb) {} - - void swap(test_iostream& s) {base::swap(s);} -}; - -int main() -{ - { - testbuf sb1; - testbuf sb2; - test_iostream is1(&sb1); - test_iostream is2(&sb2); - is1.swap(is2); - assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); - assert(is1.fill() == ' '); - assert(is1.rdstate() == is1.goodbit); - assert(is1.exceptions() == is1.goodbit); - assert(is1.flags() == (is1.skipws | is1.dec)); - assert(is1.precision() == 6); - assert(is1.getloc().name() == "C"); - assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); - assert(is2.fill() == ' '); - assert(is2.rdstate() == is2.goodbit); - assert(is2.exceptions() == is2.goodbit); - assert(is2.flags() == (is2.skipws | is2.dec)); - assert(is2.precision() == 6); - assert(is2.getloc().name() == "C"); - } - { - testbuf sb1; - testbuf sb2; - test_iostream is1(&sb1); - test_iostream is2(&sb2); - is1.swap(is2); - assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); - assert(is1.fill() == ' '); - assert(is1.rdstate() == is1.goodbit); - assert(is1.exceptions() == is1.goodbit); - assert(is1.flags() == (is1.skipws | is1.dec)); - assert(is1.precision() == 6); - assert(is1.getloc().name() == "C"); - assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); - assert(is2.fill() == ' '); - assert(is2.rdstate() == is2.goodbit); - assert(is2.exceptions() == is2.goodbit); - assert(is2.flags() == (is2.skipws | is2.dec)); - assert(is2.precision() == 6); - assert(is2.getloc().name() == "C"); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp deleted file mode 100644 index 2032e935bfa..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp +++ /dev/null @@ -1,92 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_iostream; - -// basic_iostream& operator=(basic_iostream&& rhs); - -#include -#include - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_iostream - : public std::basic_iostream -{ - typedef std::basic_iostream base; - test_iostream(testbuf* sb) : base(sb) {} - - test_iostream& operator=(test_iostream&& s) - {base::operator=(std::move(s)); return *this;} -}; - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - testbuf sb1; - testbuf sb2; - test_iostream is1(&sb1); - test_iostream is2(&sb2); - is2 = (std::move(is1)); - assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); - assert(is1.fill() == ' '); - assert(is1.rdstate() == is1.goodbit); - assert(is1.exceptions() == is1.goodbit); - assert(is1.flags() == (is1.skipws | is1.dec)); - assert(is1.precision() == 6); - assert(is1.getloc().name() == "C"); - assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); - assert(is2.fill() == ' '); - assert(is2.rdstate() == is2.goodbit); - assert(is2.exceptions() == is2.goodbit); - assert(is2.flags() == (is2.skipws | is2.dec)); - assert(is2.precision() == 6); - assert(is2.getloc().name() == "C"); - } - { - testbuf sb1; - testbuf sb2; - test_iostream is1(&sb1); - test_iostream is2(&sb2); - is2 = (std::move(is1)); - assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); - assert(is1.fill() == ' '); - assert(is1.rdstate() == is1.goodbit); - assert(is1.exceptions() == is1.goodbit); - assert(is1.flags() == (is1.skipws | is1.dec)); - assert(is1.precision() == 6); - assert(is1.getloc().name() == "C"); - assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); - assert(is2.fill() == ' '); - assert(is2.rdstate() == is2.goodbit); - assert(is2.exceptions() == is2.goodbit); - assert(is2.flags() == (is2.skipws | is2.dec)); - assert(is2.precision() == 6); - assert(is2.getloc().name() == "C"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp deleted file mode 100644 index c0592e927c8..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp +++ /dev/null @@ -1,78 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_iostream; - -// basic_iostream(basic_iostream&& rhs); - -#include -#include - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_iostream - : public std::basic_iostream -{ - typedef std::basic_iostream base; - test_iostream(testbuf* sb) : base(sb) {} - - test_iostream(test_iostream&& s) - : base(std::move(s)) {} -}; - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - testbuf sb; - test_iostream is1(&sb); - test_iostream is(std::move(is1)); - assert(is1.rdbuf() == &sb); - assert(is1.gcount() == 0); - assert(is.gcount() == 0); - assert(is.rdbuf() == 0); - assert(is.tie() == 0); - assert(is.fill() == ' '); - assert(is.rdstate() == is.goodbit); - assert(is.exceptions() == is.goodbit); - assert(is.flags() == (is.skipws | is.dec)); - assert(is.precision() == 6); - assert(is.getloc().name() == "C"); - } - { - testbuf sb; - test_iostream is1(&sb); - test_iostream is(std::move(is1)); - assert(is1.gcount() == 0); - assert(is.gcount() == 0); - assert(is1.rdbuf() == &sb); - assert(is.rdbuf() == 0); - assert(is.tie() == 0); - assert(is.fill() == L' '); - assert(is.rdstate() == is.goodbit); - assert(is.exceptions() == is.goodbit); - assert(is.flags() == (is.skipws | is.dec)); - assert(is.precision() == 6); - assert(is.getloc().name() == "C"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp deleted file mode 100644 index dacc8d26d76..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp +++ /dev/null @@ -1,55 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_iostream; - -// explicit basic_iostream(basic_streambuf* sb); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::basic_iostream is(&sb); - assert(is.rdbuf() == &sb); - assert(is.tie() == 0); - assert(is.fill() == ' '); - assert(is.rdstate() == is.goodbit); - assert(is.exceptions() == is.goodbit); - assert(is.flags() == (is.skipws | is.dec)); - assert(is.precision() == 6); - assert(is.getloc().name() == "C"); - assert(is.gcount() == 0); - } - { - testbuf sb; - std::basic_iostream is(&sb); - assert(is.rdbuf() == &sb); - assert(is.tie() == 0); - assert(is.fill() == L' '); - assert(is.rdstate() == is.goodbit); - assert(is.exceptions() == is.goodbit); - assert(is.flags() == (is.skipws | is.dec)); - assert(is.precision() == 6); - assert(is.getloc().name() == "C"); - assert(is.gcount() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.dest/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.dest/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/iostream.dest/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/types.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/types.pass.cpp deleted file mode 100644 index 6890f1cf7c1..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/iostreamclass/types.pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_iostream : -// public basic_istream, -// public basic_ostream -// { -// public: -// // types: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_iostream >::value), ""); - static_assert((std::is_base_of, std::basic_iostream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp deleted file mode 100644 index beaebfe8566..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(bool& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - bool n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - bool n = true; - is >> n; - assert(n == false); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 1 "); - std::istream is(&sb); - bool n = 0; - is >> n; - assert(n == true); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" 1 "); - std::wistream is(&sb); - bool n = 0; - is >> n; - assert(n == true); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp deleted file mode 100644 index 1c8716e86e4..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(double& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - double n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - double n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - double n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" -123.5 "); - std::wistream is(&sb); - double n = 10; - is >> n; - assert(n == -123.5); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp deleted file mode 100644 index f5ef23e654a..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(float& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - float n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - float n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - float n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" -123.5 "); - std::wistream is(&sb); - float n = 10; - is >> n; - assert(n == -123.5); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp deleted file mode 100644 index 25687db16f3..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(int& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - int n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - int n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - int n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" -1234567890123456 "); - std::wistream is(&sb); - int n = 10; - is >> n; - assert(n == std::numeric_limits::min()); - assert(!is.eof()); - assert( is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp deleted file mode 100644 index 4b4765452c6..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(long& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - long n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - long n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - long n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" -123 "); - std::wistream is(&sb); - long n = 10; - is >> n; - assert(n == -123); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp deleted file mode 100644 index cc70faed6c2..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(long double& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - long double n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - long double n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - long double n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" -123.5 "); - std::wistream is(&sb); - long double n = 10; - is >> n; - assert(n == -123.5); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp deleted file mode 100644 index c37e1751624..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(long long& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - long long n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - long long n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - long long n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" -123 "); - std::wistream is(&sb); - long long n = 10; - is >> n; - assert(n == -123); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp deleted file mode 100644 index 52b35666424..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp +++ /dev/null @@ -1,97 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(void*& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - void* n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - void* n = (void*)1; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 1 "); - std::istream is(&sb); - void* n = 0; - is >> n; - assert(n == (void*)1); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" 1 "); - std::wistream is(&sb); - void* n = 0; - is >> n; - assert(n == (void*)1); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb("12345678"); - std::istream is(&sb); - void* n = 0; - is >> n; - assert(n == (void*)0x12345678); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L"12345678"); - std::wistream is(&sb); - void* n = 0; - is >> n; - assert(n == (void*)0x12345678); - assert( is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp deleted file mode 100644 index 62e44f542a6..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(short& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - short n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - short n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - short n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" -1234567890 "); - std::wistream is(&sb); - short n = 10; - is >> n; - assert(n == std::numeric_limits::min()); - assert(!is.eof()); - assert( is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp deleted file mode 100644 index 6f1091690da..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(unsigned int& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - unsigned int n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - unsigned int n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - unsigned int n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" 123 "); - std::wistream is(&sb); - unsigned int n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp deleted file mode 100644 index eb8a7231ffc..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(unsigned long& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - unsigned long n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - unsigned long n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - unsigned long n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" 123 "); - std::wistream is(&sb); - unsigned long n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp deleted file mode 100644 index 1db250ed463..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(unsigned long long& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - unsigned long long n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - unsigned long long n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - unsigned long long n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" 123 "); - std::wistream is(&sb); - unsigned long long n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp deleted file mode 100644 index 78fdc663882..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// operator>>(unsigned short& val); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - std::istream is((std::streambuf*)0); - unsigned short n = 0; - is >> n; - assert(is.fail()); - } - { - testbuf sb("0"); - std::istream is(&sb); - unsigned short n = 10; - is >> n; - assert(n == 0); - assert( is.eof()); - assert(!is.fail()); - } - { - testbuf sb(" 123 "); - std::istream is(&sb); - unsigned short n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } - { - testbuf sb(L" 123 "); - std::wistream is(&sb); - unsigned short n = 10; - is >> n; - assert(n == 123); - assert(!is.eof()); - assert(!is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.reqmts/tested_elsewhere.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.reqmts/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.reqmts/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp deleted file mode 100644 index 0d4516d5556..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// basic_istream& operator>>(basic_ios& -// (*pf)(basic_ios&)); - -#include -#include - -int f_called = 0; - -template -std::basic_ios& -f(std::basic_ios& is) -{ - ++f_called; - return is; -} - -int main() -{ - { - std::istream is((std::streambuf*)0); - is >> f; - assert(f_called == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp deleted file mode 100644 index b5068220cff..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// basic_istream& operator>>(basic_istream&& in, charT& c); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" "); - std::istream is(&sb); - char c = 'z'; - is >> c; - assert( is.eof()); - assert( is.fail()); - assert(c == 'z'); - } - { - testbuf sb(" abcdefghijk "); - std::istream is(&sb); - char c; - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'a'); - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'b'); - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'c'); - } - { - testbuf sb(L" abc"); - std::wistream is(&sb); - wchar_t c; - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'a'); - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'b'); - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'c'); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp deleted file mode 100644 index d4cb2bb13b2..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// basic_istream& operator>>(ios_base& (*pf)(ios_base&)); - -#include -#include - -int f_called = 0; - -std::ios_base& -f(std::ios_base& is) -{ - ++f_called; - return is; -} - -int main() -{ - { - std::istream is((std::streambuf*)0); - is >> f; - assert(f_called == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp deleted file mode 100644 index 4c3aef491ea..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// basic_istream& operator>>(basic_istream& -// (*pf)(basic_istream&)); - -#include -#include - -int f_called = 0; - -template -std::basic_istream& -f(std::basic_istream& is) -{ - ++f_called; - return is; -} - -int main() -{ - { - std::istream is((std::streambuf*)0); - is >> f; - assert(f_called == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp deleted file mode 100644 index a02fe2c51a6..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// basic_istream& operator>>(basic_istream&& in, signed char& c); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" "); - std::istream is(&sb); - signed char c = 'z'; - is >> c; - assert( is.eof()); - assert( is.fail()); - assert(c == 'z'); - } - { - testbuf sb(" abcdefghijk "); - std::istream is(&sb); - signed char c; - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'a'); - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'b'); - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'c'); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp deleted file mode 100644 index 70f1c20108f..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// basic_istream& operator>>(basic_istream&& in, signed char* s); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" abcdefghijk "); - std::istream is(&sb); - signed char s[20]; - is >> s; - assert(!is.eof()); - assert(!is.fail()); - assert(std::string((char*)s) == "abcdefghijk"); - } - { - testbuf sb(" abcdefghijk "); - std::istream is(&sb); - is.width(4); - signed char s[20]; - is >> s; - assert(!is.eof()); - assert(!is.fail()); - assert(std::string((char*)s) == "abc"); - assert(is.width() == 0); - } - { - testbuf sb(" abcdefghijk"); - std::istream is(&sb); - signed char s[20]; - is >> s; - assert( is.eof()); - assert(!is.fail()); - assert(std::string((char*)s) == "abcdefghijk"); - assert(is.width() == 0); - } - { - testbuf sb(" abcdefghijk"); - std::istream is(&sb); - signed char s[20]; - is.width(1); - is >> s; - assert(!is.eof()); - assert( is.fail()); - assert(std::string((char*)s) == ""); - assert(is.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp deleted file mode 100644 index 29ed68e9770..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// basic_istream& operator<<(basic_streambuf* sb); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - testbuf(const std::basic_string& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - testbuf sb("testing..."); - std::istream is(&sb); - testbuf sb2; - is >> &sb2; - assert(sb2.str() == "testing..."); - assert(is.gcount() == 10); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp deleted file mode 100644 index 8f19cea7b88..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// basic_istream& operator>>(basic_istream&& in, unsigned char& c); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" "); - std::istream is(&sb); - unsigned char c = 'z'; - is >> c; - assert( is.eof()); - assert( is.fail()); - assert(c == 'z'); - } - { - testbuf sb(" abcdefghijk "); - std::istream is(&sb); - unsigned char c; - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'a'); - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'b'); - is >> c; - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'c'); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp deleted file mode 100644 index 07fa5a79e8f..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// basic_istream& operator>>(basic_istream&& in, unsigned char* s); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" abcdefghijk "); - std::istream is(&sb); - unsigned char s[20]; - is >> s; - assert(!is.eof()); - assert(!is.fail()); - assert(std::string((char*)s) == "abcdefghijk"); - } - { - testbuf sb(" abcdefghijk "); - std::istream is(&sb); - is.width(4); - unsigned char s[20]; - is >> s; - assert(!is.eof()); - assert(!is.fail()); - assert(std::string((char*)s) == "abc"); - assert(is.width() == 0); - } - { - testbuf sb(" abcdefghijk"); - std::istream is(&sb); - unsigned char s[20]; - is >> s; - assert( is.eof()); - assert(!is.fail()); - assert(std::string((char*)s) == "abcdefghijk"); - assert(is.width() == 0); - } - { - testbuf sb(" abcdefghijk"); - std::istream is(&sb); - unsigned char s[20]; - is.width(1); - is >> s; - assert(!is.eof()); - assert( is.fail()); - assert(std::string((char*)s) == ""); - assert(is.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp deleted file mode 100644 index a00c7a1dda3..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// basic_istream& operator>>(basic_istream&& in, charT* s); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" abcdefghijk "); - std::istream is(&sb); - char s[20]; - is >> s; - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == "abcdefghijk"); - } - { - testbuf sb(L" abcdefghijk "); - std::wistream is(&sb); - is.width(4); - wchar_t s[20]; - is >> s; - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L"abc"); - assert(is.width() == 0); - } - { - testbuf sb(L" abcdefghijk"); - std::wistream is(&sb); - wchar_t s[20]; - is >> s; - assert( is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L"abcdefghijk"); - assert(is.width() == 0); - } - { - testbuf sb(" abcdefghijk"); - std::istream is(&sb); - char s[20]; - is.width(1); - is >> s; - assert(!is.eof()); - assert( is.fail()); - assert(std::string(s) == ""); - assert(is.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp deleted file mode 100644 index 3c8159a6d7c..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// basic_istream& -// ws(basic_istream& is); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" 123"); - std::istream is(&sb); - ws(is); - assert(is.good()); - assert(is.peek() == '1'); - } - { - testbuf sb(L" 123"); - std::wistream is(&sb); - ws(is); - assert(is.good()); - assert(is.peek() == L'1'); - } - { - testbuf sb(" "); - std::istream is(&sb); - ws(is); - assert(!is.fail()); - assert(is.eof()); - ws(is); - assert(is.eof()); - assert(is.fail()); - } - { - testbuf sb(L" "); - std::wistream is(&sb); - ws(is); - assert(!is.fail()); - assert(is.eof()); - ws(is); - assert(is.eof()); - assert(is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp deleted file mode 100644 index 5b7664e3f55..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// basic_istream& -// operator>>(basic_istream&& is, T& x); - -#include -#include - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - testbuf sb(" 123"); - int i = 0; - std::istream(&sb) >> i; - assert(i == 123); - } - { - testbuf sb(L" 123"); - int i = 0; - std::wistream(&sb) >> i; - assert(i == 123); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp deleted file mode 100644 index 41a721d50f1..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp +++ /dev/null @@ -1,100 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// int_type get(); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" "); - std::istream is(&sb); - char c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == ' '); - assert(is.gcount() == 1); - } - { - testbuf sb(" abc"); - std::istream is(&sb); - char c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == ' '); - assert(is.gcount() == 1); - c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'a'); - assert(is.gcount() == 1); - c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'b'); - assert(is.gcount() == 1); - c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'c'); - assert(is.gcount() == 1); - } - { - testbuf sb(L" abc"); - std::wistream is(&sb); - wchar_t c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == L' '); - assert(is.gcount() == 1); - c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'a'); - assert(is.gcount() == 1); - c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'b'); - assert(is.gcount() == 1); - c = is.get(); - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'c'); - assert(is.gcount() == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp deleted file mode 100644 index cf06e343bcc..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp +++ /dev/null @@ -1,103 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& get(char_type& c); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" "); - std::istream is(&sb); - char c; - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == ' '); - assert(is.gcount() == 1); - } - { - testbuf sb(" abc"); - std::istream is(&sb); - char c; - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == ' '); - assert(is.gcount() == 1); - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'a'); - assert(is.gcount() == 1); - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'b'); - assert(is.gcount() == 1); - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == 'c'); - assert(is.gcount() == 1); - } - { - testbuf sb(L" abc"); - std::wistream is(&sb); - wchar_t c; - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == L' '); - assert(is.gcount() == 1); - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'a'); - assert(is.gcount() == 1); - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'b'); - assert(is.gcount() == 1); - is.get(c); - assert(!is.eof()); - assert(!is.fail()); - assert(c == L'c'); - assert(is.gcount() == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp deleted file mode 100644 index 1691a2d2de1..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp +++ /dev/null @@ -1,99 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& get(char_type* s, streamsize n); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" \n \n "); - std::istream is(&sb); - char s[5]; - is.get(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 2); - is.get(s, 5); - assert(!is.eof()); - assert( is.fail()); - assert(std::string(s) == ""); - assert(is.gcount() == 0); - is.clear(); - assert(is.get() == '\n'); - is.get(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 4); - assert(is.get() == '\n'); - is.get(s, 5); - assert( is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 1); - } - { - testbuf sb(L" \n \n "); - std::wistream is(&sb); - wchar_t s[5]; - is.get(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 2); - is.get(s, 5); - assert(!is.eof()); - assert( is.fail()); - assert(std::wstring(s) == L""); - assert(is.gcount() == 0); - is.clear(); - assert(is.get() == L'\n'); - is.get(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 4); - assert(is.get() == L'\n'); - is.get(s, 5); - assert( is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp deleted file mode 100644 index c9389ec9dad..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp +++ /dev/null @@ -1,99 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& get(char_type* s, streamsize n, char_type delim); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" * * "); - std::istream is(&sb); - char s[5]; - is.get(s, 5, '*'); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 2); - is.get(s, 5, '*'); - assert(!is.eof()); - assert( is.fail()); - assert(std::string(s) == ""); - assert(is.gcount() == 0); - is.clear(); - assert(is.get() == '*'); - is.get(s, 5, '*'); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 4); - assert(is.get() == '*'); - is.get(s, 5, '*'); - assert( is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 1); - } - { - testbuf sb(L" * * "); - std::wistream is(&sb); - wchar_t s[5]; - is.get(s, 5, L'*'); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 2); - is.get(s, 5, L'*'); - assert(!is.eof()); - assert( is.fail()); - assert(std::wstring(s) == L""); - assert(is.gcount() == 0); - is.clear(); - assert(is.get() == L'*'); - is.get(s, 5, L'*'); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 4); - assert(is.get() == L'*'); - is.get(s, 5, L'*'); - assert( is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp deleted file mode 100644 index 7a55f847d73..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& get(basic_streambuf& sb); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - testbuf(const std::basic_string& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - testbuf sb("testing\n..."); - std::istream is(&sb); - testbuf sb2; - is.get(sb2); - assert(sb2.str() == "testing"); - assert(is.good()); - assert(is.gcount() == 7); - assert(is.get() == '\n'); - is.get(sb2); - assert(sb2.str() == "testing..."); - assert(is.eof()); - assert(!is.fail()); - assert(is.gcount() == 3); - } - { - testbuf sb(L"testing\n..."); - std::wistream is(&sb); - testbuf sb2; - is.get(sb2); - assert(sb2.str() == L"testing"); - assert(is.good()); - assert(is.gcount() == 7); - assert(is.get() == L'\n'); - is.get(sb2); - assert(sb2.str() == L"testing..."); - assert(is.eof()); - assert(!is.fail()); - assert(is.gcount() == 3); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp deleted file mode 100644 index cbc007587d5..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp +++ /dev/null @@ -1,89 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& get(basic_streambuf& sb, -// char_type delim); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - testbuf(const std::basic_string& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - testbuf sb("testing*..."); - std::istream is(&sb); - testbuf sb2; - is.get(sb2, '*'); - assert(sb2.str() == "testing"); - assert(is.good()); - assert(is.gcount() == 7); - assert(is.get() == '*'); - is.get(sb2, '*'); - assert(sb2.str() == "testing..."); - assert(is.eof()); - assert(!is.fail()); - assert(is.gcount() == 3); - } - { - testbuf sb(L"testing*..."); - std::wistream is(&sb); - testbuf sb2; - is.get(sb2, L'*'); - assert(sb2.str() == L"testing"); - assert(is.good()); - assert(is.gcount() == 7); - assert(is.get() == L'*'); - is.get(sb2, L'*'); - assert(sb2.str() == L"testing..."); - assert(is.eof()); - assert(!is.fail()); - assert(is.gcount() == 3); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp deleted file mode 100644 index 465824a659f..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& getline(char_type* s, streamsize n); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" \n \n "); - std::istream is(&sb); - char s[5]; - is.getline(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 3); - is.getline(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 5); - is.getline(s, 5); - assert( is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 1); - } - { - testbuf sb(L" \n \n "); - std::wistream is(&sb); - wchar_t s[5]; - is.getline(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 3); - is.getline(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 5); - is.getline(s, 5); - assert( is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp deleted file mode 100644 index 7362959966a..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& getline(char_type* s, streamsize n, char_type delim); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" * * "); - std::istream is(&sb); - char s[5]; - is.getline(s, 5, '*'); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 3); - is.getline(s, 5, '*'); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 5); - is.getline(s, 5, '*'); - assert( is.eof()); - assert(!is.fail()); - assert(std::string(s) == " "); - assert(is.gcount() == 1); - } - { - testbuf sb(L" * * "); - std::wistream is(&sb); - wchar_t s[5]; - is.getline(s, 5, L'*'); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 3); - is.getline(s, 5, L'*'); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 5); - is.getline(s, 5, L'*'); - assert( is.eof()); - assert(!is.fail()); - assert(std::wstring(s) == L" "); - assert(is.gcount() == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp deleted file mode 100644 index 9510961a4c5..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& -// ignore(streamsize n = 1, int_type delim = traits::eof()); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" 1\n2345\n6"); - std::istream is(&sb); - is.ignore(); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 1); - is.ignore(5, '\n'); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 2); - is.ignore(15); - assert( is.eof()); - assert(!is.fail()); - assert(is.gcount() == 6); - } - { - testbuf sb(L" 1\n2345\n6"); - std::wistream is(&sb); - is.ignore(); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 1); - is.ignore(5, '\n'); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 2); - is.ignore(15); - assert( is.eof()); - assert(!is.fail()); - assert(is.gcount() == 6); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp deleted file mode 100644 index ccc3545483e..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& -// ignore(streamsize n = 1, int_type delim = traits::eof()); - -// http://llvm.org/bugs/show_bug.cgi?id=16427 - -#include -#include - -int main() -{ - int bad=-1; - std::ostringstream os; - os << "aaaabbbb" << static_cast(bad) - << "ccccdddd" << std::endl; - std::string s=os.str(); - - std::istringstream is(s); - const unsigned int ignoreLen=10; - size_t a=is.tellg(); - is.ignore(ignoreLen); - size_t b=is.tellg(); - assert((b-a)==ignoreLen); -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp deleted file mode 100644 index 4264849a091..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// int_type peek(); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" 1\n2345\n6"); - std::istream is(&sb); - assert(is.peek() == ' '); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 0); - is.get(); - assert(is.peek() == '1'); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 0); - } - { - testbuf sb(L" 1\n2345\n6"); - std::wistream is(&sb); - assert(is.peek() == L' '); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 0); - is.get(); - assert(is.peek() == L'1'); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp deleted file mode 100644 index 3564d710bc2..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp +++ /dev/null @@ -1,89 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& putback(char_type c); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" 123456789"); - std::istream is(&sb); - is.get(); - is.get(); - is.get(); - is.putback('a'); - assert(is.bad()); - assert(is.gcount() == 0); - is.clear(); - is.putback('2'); - assert(is.good()); - assert(is.gcount() == 0); - is.putback('1'); - assert(is.good()); - assert(is.gcount() == 0); - is.putback(' '); - assert(is.good()); - assert(is.gcount() == 0); - is.putback(' '); - assert(is.bad()); - assert(is.gcount() == 0); - } - { - testbuf sb(L" 123456789"); - std::wistream is(&sb); - is.get(); - is.get(); - is.get(); - is.putback(L'a'); - assert(is.bad()); - assert(is.gcount() == 0); - is.clear(); - is.putback(L'2'); - assert(is.good()); - assert(is.gcount() == 0); - is.putback(L'1'); - assert(is.good()); - assert(is.gcount() == 0); - is.putback(L' '); - assert(is.good()); - assert(is.gcount() == 0); - is.putback(L' '); - assert(is.bad()); - assert(is.gcount() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp deleted file mode 100644 index 20e70cfbd5c..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& read(char_type* s, streamsize n); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" 123456789"); - std::istream is(&sb); - char s[5]; - is.read(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s, 5) == " 1234"); - assert(is.gcount() == 5); - is.read(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s, 5) == "56789"); - assert(is.gcount() == 5); - is.read(s, 5); - assert( is.eof()); - assert( is.fail()); - assert(is.gcount() == 0); - } - { - testbuf sb(L" 123456789"); - std::wistream is(&sb); - wchar_t s[5]; - is.read(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s, 5) == L" 1234"); - assert(is.gcount() == 5); - is.read(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s, 5) == L"56789"); - assert(is.gcount() == 5); - is.read(s, 5); - assert( is.eof()); - assert( is.fail()); - assert(is.gcount() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp deleted file mode 100644 index 01eecb5d824..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// streamsize readsome(char_type* s, streamsize n); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" 1234567890"); - std::istream is(&sb); - char s[5]; - assert(is.readsome(s, 5) == 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s, 5) == " 1234"); - assert(is.gcount() == 5); - is.readsome(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::string(s, 5) == "56789"); - assert(is.gcount() == 5); - is.readsome(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 1); - assert(std::string(s, 1) == "0"); - assert(is.readsome(s, 5) == 0); - } - { - testbuf sb(L" 1234567890"); - std::wistream is(&sb); - wchar_t s[5]; - assert(is.readsome(s, 5) == 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s, 5) == L" 1234"); - assert(is.gcount() == 5); - is.readsome(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(std::wstring(s, 5) == L"56789"); - assert(is.gcount() == 5); - is.readsome(s, 5); - assert(!is.eof()); - assert(!is.fail()); - assert(is.gcount() == 1); - assert(std::wstring(s, 1) == L"0"); - assert(is.readsome(s, 5) == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp deleted file mode 100644 index e6f4e1e4c19..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp +++ /dev/null @@ -1,66 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& seekg(pos_type pos); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -protected: - typename base::pos_type seekpos(typename base::pos_type sp, - std::ios_base::openmode which) - { - assert(which == std::ios_base::in); - return sp; - } -}; - -int main() -{ - { - testbuf sb(" 123456789"); - std::istream is(&sb); - is.seekg(5); - assert(is.good()); - is.seekg(-1); - assert(is.fail()); - } - { - testbuf sb(L" 123456789"); - std::wistream is(&sb); - is.seekg(5); - assert(is.good()); - is.seekg(-1); - assert(is.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp deleted file mode 100644 index 73f3da1c6bd..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp +++ /dev/null @@ -1,74 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& seekg(off_type off, ios_base::seekdir dir); - -#include -#include - -int seekoff_called = 0; - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -protected: - typename base::pos_type seekoff(typename base::off_type off, - std::ios_base::seekdir way, - std::ios_base::openmode which) - { - assert(which == std::ios_base::in); - ++seekoff_called; - return off; - } -}; - -int main() -{ - { - testbuf sb(" 123456789"); - std::istream is(&sb); - is.seekg(5, std::ios_base::cur); - assert(is.good()); - assert(seekoff_called == 1); - is.seekg(-1, std::ios_base::beg); - assert(is.fail()); - assert(seekoff_called == 2); - } - { - testbuf sb(L" 123456789"); - std::wistream is(&sb); - is.seekg(5, std::ios_base::cur); - assert(is.good()); - assert(seekoff_called == 3); - is.seekg(-1, std::ios_base::beg); - assert(is.fail()); - assert(seekoff_called == 4); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp deleted file mode 100644 index 61db67cd5a5..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp +++ /dev/null @@ -1,64 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// int sync(); - -#include -#include - -int sync_called = 0; - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} - -protected: - int sync() - { - ++sync_called; - return 5; - } -}; - -int main() -{ - { - testbuf sb(" 123456789"); - std::istream is(&sb); - assert(is.sync() == 0); - assert(sync_called == 1); - } - { - testbuf sb(L" 123456789"); - std::wistream is(&sb); - assert(is.sync() == 0); - assert(sync_called == 2); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/tellg.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/tellg.pass.cpp deleted file mode 100644 index 799b46b97de..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/tellg.pass.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// pos_type tellg(); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -protected: - typename base::pos_type seekoff(typename base::off_type off, - std::ios_base::seekdir way, - std::ios_base::openmode which) - { - assert(off == 0); - assert(way == std::ios_base::cur); - assert(which == std::ios_base::in); - return 5; - } -}; - -int main() -{ - { - testbuf sb(" 123456789"); - std::istream is(&sb); - assert(is.tellg() == 5); - } - { - testbuf sb(L" 123456789"); - std::wistream is(&sb); - assert(is.tellg() == 5); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp deleted file mode 100644 index adf0a6117c1..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_istream& unget(); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -}; - -int main() -{ - { - testbuf sb(" 123456789"); - std::istream is(&sb); - is.get(); - is.get(); - is.get(); - is.unget(); - assert(is.good()); - assert(is.gcount() == 0); - is.unget(); - assert(is.good()); - assert(is.gcount() == 0); - is.unget(); - assert(is.good()); - assert(is.gcount() == 0); - is.unget(); - assert(is.bad()); - assert(is.gcount() == 0); - } - { - testbuf sb(L" 123456789"); - std::wistream is(&sb); - is.get(); - is.get(); - is.get(); - is.unget(); - assert(is.good()); - assert(is.gcount() == 0); - is.unget(); - assert(is.good()); - assert(is.gcount() == 0); - is.unget(); - assert(is.good()); - assert(is.gcount() == 0); - is.unget(); - assert(is.bad()); - assert(is.gcount() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp deleted file mode 100644 index a0734b8016b..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// void swap(basic_istream& rhs); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_istream - : public std::basic_istream -{ - typedef std::basic_istream base; - test_istream(testbuf* sb) : base(sb) {} - - void swap(test_istream& s) {base::swap(s);} -}; - -int main() -{ - { - testbuf sb1; - testbuf sb2; - test_istream is1(&sb1); - test_istream is2(&sb2); - is1.swap(is2); - assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); - assert(is1.fill() == ' '); - assert(is1.rdstate() == is1.goodbit); - assert(is1.exceptions() == is1.goodbit); - assert(is1.flags() == (is1.skipws | is1.dec)); - assert(is1.precision() == 6); - assert(is1.getloc().name() == "C"); - assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); - assert(is2.fill() == ' '); - assert(is2.rdstate() == is2.goodbit); - assert(is2.exceptions() == is2.goodbit); - assert(is2.flags() == (is2.skipws | is2.dec)); - assert(is2.precision() == 6); - assert(is2.getloc().name() == "C"); - } - { - testbuf sb1; - testbuf sb2; - test_istream is1(&sb1); - test_istream is2(&sb2); - is1.swap(is2); - assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); - assert(is1.fill() == ' '); - assert(is1.rdstate() == is1.goodbit); - assert(is1.exceptions() == is1.goodbit); - assert(is1.flags() == (is1.skipws | is1.dec)); - assert(is1.precision() == 6); - assert(is1.getloc().name() == "C"); - assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); - assert(is2.fill() == ' '); - assert(is2.rdstate() == is2.goodbit); - assert(is2.exceptions() == is2.goodbit); - assert(is2.flags() == (is2.skipws | is2.dec)); - assert(is2.precision() == 6); - assert(is2.getloc().name() == "C"); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp deleted file mode 100644 index 2876d76c198..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp +++ /dev/null @@ -1,92 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// basic_istream& operator=(basic_istream&& rhs); - -#include -#include - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_istream - : public std::basic_istream -{ - typedef std::basic_istream base; - test_istream(testbuf* sb) : base(sb) {} - - test_istream& operator=(test_istream&& s) - {base::operator=(std::move(s)); return *this;} -}; - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - testbuf sb1; - testbuf sb2; - test_istream is1(&sb1); - test_istream is2(&sb2); - is2 = (std::move(is1)); - assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); - assert(is1.fill() == ' '); - assert(is1.rdstate() == is1.goodbit); - assert(is1.exceptions() == is1.goodbit); - assert(is1.flags() == (is1.skipws | is1.dec)); - assert(is1.precision() == 6); - assert(is1.getloc().name() == "C"); - assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); - assert(is2.fill() == ' '); - assert(is2.rdstate() == is2.goodbit); - assert(is2.exceptions() == is2.goodbit); - assert(is2.flags() == (is2.skipws | is2.dec)); - assert(is2.precision() == 6); - assert(is2.getloc().name() == "C"); - } - { - testbuf sb1; - testbuf sb2; - test_istream is1(&sb1); - test_istream is2(&sb2); - is2 = (std::move(is1)); - assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); - assert(is1.fill() == ' '); - assert(is1.rdstate() == is1.goodbit); - assert(is1.exceptions() == is1.goodbit); - assert(is1.flags() == (is1.skipws | is1.dec)); - assert(is1.precision() == 6); - assert(is1.getloc().name() == "C"); - assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); - assert(is2.fill() == ' '); - assert(is2.rdstate() == is2.goodbit); - assert(is2.exceptions() == is2.goodbit); - assert(is2.flags() == (is2.skipws | is2.dec)); - assert(is2.precision() == 6); - assert(is2.getloc().name() == "C"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp deleted file mode 100644 index 04cb9d3fb6b..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp +++ /dev/null @@ -1,78 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// basic_istream(basic_istream&& rhs); - -#include -#include - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_istream - : public std::basic_istream -{ - typedef std::basic_istream base; - test_istream(testbuf* sb) : base(sb) {} - - test_istream(test_istream&& s) - : base(std::move(s)) {} -}; - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - testbuf sb; - test_istream is1(&sb); - test_istream is(std::move(is1)); - assert(is1.rdbuf() == &sb); - assert(is1.gcount() == 0); - assert(is.gcount() == 0); - assert(is.rdbuf() == 0); - assert(is.tie() == 0); - assert(is.fill() == ' '); - assert(is.rdstate() == is.goodbit); - assert(is.exceptions() == is.goodbit); - assert(is.flags() == (is.skipws | is.dec)); - assert(is.precision() == 6); - assert(is.getloc().name() == "C"); - } - { - testbuf sb; - test_istream is1(&sb); - test_istream is(std::move(is1)); - assert(is1.gcount() == 0); - assert(is.gcount() == 0); - assert(is1.rdbuf() == &sb); - assert(is.rdbuf() == 0); - assert(is.tie() == 0); - assert(is.fill() == L' '); - assert(is.rdstate() == is.goodbit); - assert(is.exceptions() == is.goodbit); - assert(is.flags() == (is.skipws | is.dec)); - assert(is.precision() == 6); - assert(is.getloc().name() == "C"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp deleted file mode 100644 index 74ed57dae6b..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp +++ /dev/null @@ -1,55 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream; - -// explicit basic_istream(basic_streambuf* sb); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::basic_istream is(&sb); - assert(is.rdbuf() == &sb); - assert(is.tie() == 0); - assert(is.fill() == ' '); - assert(is.rdstate() == is.goodbit); - assert(is.exceptions() == is.goodbit); - assert(is.flags() == (is.skipws | is.dec)); - assert(is.precision() == 6); - assert(is.getloc().name() == "C"); - assert(is.gcount() == 0); - } - { - testbuf sb; - std::basic_istream is(&sb); - assert(is.rdbuf() == &sb); - assert(is.tie() == 0); - assert(is.fill() == L' '); - assert(is.rdstate() == is.goodbit); - assert(is.exceptions() == is.goodbit); - assert(is.flags() == (is.skipws | is.dec)); - assert(is.precision() == 6); - assert(is.getloc().name() == "C"); - assert(is.gcount() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp deleted file mode 100644 index 910b36931da..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp +++ /dev/null @@ -1,128 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream::sentry; - -// explicit sentry(basic_istream& is, bool noskipws = false); - -#include -#include - -int sync_called = 0; - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_string string_type; - typedef std::basic_streambuf base; -private: - string_type str_; -public: - - testbuf() {} - testbuf(const string_type& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data()) + str_.size()); - } - - CharT* eback() const {return base::eback();} - CharT* gptr() const {return base::gptr();} - CharT* egptr() const {return base::egptr();} -protected: - - int virtual sync() - { - ++sync_called; - return 1; - } -}; - -int main() -{ - { - std::istream is((testbuf*)0); - std::istream::sentry sen(is, true); - assert(!(bool)sen); - assert(!is.good()); - assert(is.gcount() == 0); - assert(sync_called == 0); - } - { - std::wistream is((testbuf*)0); - std::wistream::sentry sen(is, true); - assert(!(bool)sen); - assert(!is.good()); - assert(is.gcount() == 0); - assert(sync_called == 0); - } - { - testbuf sb(" 123"); - std::istream is(&sb); - std::istream::sentry sen(is, true); - assert((bool)sen); - assert(is.good()); - assert(is.gcount() == 0); - assert(sync_called == 0); - assert(sb.gptr() == sb.eback()); - } - { - testbuf sb(L" 123"); - std::wistream is(&sb); - std::wistream::sentry sen(is, true); - assert((bool)sen); - assert(is.good()); - assert(is.gcount() == 0); - assert(sync_called == 0); - assert(sb.gptr() == sb.eback()); - } - { - testbuf sb(" 123"); - std::istream is(&sb); - std::istream::sentry sen(is); - assert((bool)sen); - assert(is.good()); - assert(sync_called == 0); - assert(sb.gptr() == sb.eback() + 3); - } - { - testbuf sb(L" 123"); - std::wistream is(&sb); - std::wistream::sentry sen(is); - assert((bool)sen); - assert(is.good()); - assert(sync_called == 0); - assert(sb.gptr() == sb.eback() + 3); - } - { - testbuf sb(" "); - std::istream is(&sb); - std::istream::sentry sen(is); - assert(!(bool)sen); - assert(is.fail()); - assert(is.eof()); - assert(sync_called == 0); - assert(sb.gptr() == sb.eback() + 6); - } - { - testbuf sb(" "); - std::istream is(&sb); - std::istream::sentry sen(is, true); - assert((bool)sen); - assert(is.good()); - assert(sync_called == 0); - assert(sb.gptr() == sb.eback()); - } -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream/types.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream/types.pass.cpp deleted file mode 100644 index 36cc2029db2..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/istream/types.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_istream -// : virtual public basic_ios -// { -// public: -// // types (inherited from basic_ios (27.5.4)): -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_istream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/iostream.format/input.streams/version.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/version.pass.cpp deleted file mode 100644 index b03ef2aaa04..00000000000 --- a/libcxx/test/input.output/iostream.format/input.streams/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostream.format/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostream.format/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp deleted file mode 100644 index 8214d6c05b5..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// void swap(basic_ostream& rhs); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_ostream - : public std::basic_ostream -{ - typedef std::basic_ostream base; - test_ostream(testbuf* sb) : base(sb) {} - - void swap(test_ostream& s) {base::swap(s);} -}; - -int main() -{ - { - testbuf sb1; - testbuf sb2; - test_ostream os1(&sb1); - test_ostream os2(&sb2); - os1.swap(os2); - assert(os1.rdbuf() == &sb1); - assert(os1.tie() == 0); - assert(os1.fill() == ' '); - assert(os1.rdstate() == os1.goodbit); - assert(os1.exceptions() == os1.goodbit); - assert(os1.flags() == (os1.skipws | os1.dec)); - assert(os1.precision() == 6); - assert(os1.getloc().name() == "C"); - assert(os2.rdbuf() == &sb2); - assert(os2.tie() == 0); - assert(os2.fill() == ' '); - assert(os2.rdstate() == os2.goodbit); - assert(os2.exceptions() == os2.goodbit); - assert(os2.flags() == (os2.skipws | os2.dec)); - assert(os2.precision() == 6); - assert(os2.getloc().name() == "C"); - } - { - testbuf sb1; - testbuf sb2; - test_ostream os1(&sb1); - test_ostream os2(&sb2); - os1.swap(os2); - assert(os1.rdbuf() == &sb1); - assert(os1.tie() == 0); - assert(os1.fill() == ' '); - assert(os1.rdstate() == os1.goodbit); - assert(os1.exceptions() == os1.goodbit); - assert(os1.flags() == (os1.skipws | os1.dec)); - assert(os1.precision() == 6); - assert(os1.getloc().name() == "C"); - assert(os2.rdbuf() == &sb2); - assert(os2.tie() == 0); - assert(os2.fill() == ' '); - assert(os2.rdstate() == os2.goodbit); - assert(os2.exceptions() == os2.goodbit); - assert(os2.flags() == (os2.skipws | os2.dec)); - assert(os2.precision() == 6); - assert(os2.getloc().name() == "C"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp deleted file mode 100644 index 40fe0795de5..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp +++ /dev/null @@ -1,92 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& operator=(basic_ostream&& rhs); - -#include -#include - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_ostream - : public std::basic_ostream -{ - typedef std::basic_ostream base; - test_ostream(testbuf* sb) : base(sb) {} - - test_ostream& operator=(test_ostream&& s) - {base::operator=(std::move(s)); return *this;} -}; - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - testbuf sb1; - testbuf sb2; - test_ostream os1(&sb1); - test_ostream os2(&sb2); - os2 = (std::move(os1)); - assert(os1.rdbuf() == &sb1); - assert(os1.tie() == 0); - assert(os1.fill() == ' '); - assert(os1.rdstate() == os1.goodbit); - assert(os1.exceptions() == os1.goodbit); - assert(os1.flags() == (os1.skipws | os1.dec)); - assert(os1.precision() == 6); - assert(os1.getloc().name() == "C"); - assert(os2.rdbuf() == &sb2); - assert(os2.tie() == 0); - assert(os2.fill() == ' '); - assert(os2.rdstate() == os2.goodbit); - assert(os2.exceptions() == os2.goodbit); - assert(os2.flags() == (os2.skipws | os2.dec)); - assert(os2.precision() == 6); - assert(os2.getloc().name() == "C"); - } - { - testbuf sb1; - testbuf sb2; - test_ostream os1(&sb1); - test_ostream os2(&sb2); - os2 = (std::move(os1)); - assert(os1.rdbuf() == &sb1); - assert(os1.tie() == 0); - assert(os1.fill() == ' '); - assert(os1.rdstate() == os1.goodbit); - assert(os1.exceptions() == os1.goodbit); - assert(os1.flags() == (os1.skipws | os1.dec)); - assert(os1.precision() == 6); - assert(os1.getloc().name() == "C"); - assert(os2.rdbuf() == &sb2); - assert(os2.tie() == 0); - assert(os2.fill() == ' '); - assert(os2.rdstate() == os2.goodbit); - assert(os2.exceptions() == os2.goodbit); - assert(os2.flags() == (os2.skipws | os2.dec)); - assert(os2.precision() == 6); - assert(os2.getloc().name() == "C"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp deleted file mode 100644 index b3045b3232e..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp +++ /dev/null @@ -1,74 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream(basic_ostream&& rhs); - -#include -#include - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -template -struct test_ostream - : public std::basic_ostream -{ - typedef std::basic_ostream base; - test_ostream(testbuf* sb) : base(sb) {} - - test_ostream(test_ostream&& s) - : base(std::move(s)) {} -}; - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - testbuf sb; - test_ostream os1(&sb); - test_ostream os(std::move(os1)); - assert(os1.rdbuf() == &sb); - assert(os.rdbuf() == 0); - assert(os.tie() == 0); - assert(os.fill() == ' '); - assert(os.rdstate() == os.goodbit); - assert(os.exceptions() == os.goodbit); - assert(os.flags() == (os.skipws | os.dec)); - assert(os.precision() == 6); - assert(os.getloc().name() == "C"); - } - { - testbuf sb; - test_ostream os1(&sb); - test_ostream os(std::move(os1)); - assert(os1.rdbuf() == &sb); - assert(os.rdbuf() == 0); - assert(os.tie() == 0); - assert(os.fill() == L' '); - assert(os.rdstate() == os.goodbit); - assert(os.exceptions() == os.goodbit); - assert(os.flags() == (os.skipws | os.dec)); - assert(os.precision() == 6); - assert(os.getloc().name() == "C"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp deleted file mode 100644 index 7929e1845ec..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// explicit basic_ostream(basic_streambuf* sb); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::basic_ostream os(&sb); - assert(os.rdbuf() == &sb); - assert(os.tie() == 0); - assert(os.fill() == ' '); - assert(os.rdstate() == os.goodbit); - assert(os.exceptions() == os.goodbit); - assert(os.flags() == (os.skipws | os.dec)); - assert(os.precision() == 6); - assert(os.getloc().name() == "C"); - } - { - testbuf sb; - std::basic_ostream os(&sb); - assert(os.rdbuf() == &sb); - assert(os.tie() == 0); - assert(os.fill() == L' '); - assert(os.rdstate() == os.goodbit); - assert(os.exceptions() == os.goodbit); - assert(os.flags() == (os.skipws | os.dec)); - assert(os.precision() == 6); - assert(os.getloc().name() == "C"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.reqmts/tested_elsewhere.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.reqmts/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.reqmts/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp deleted file mode 100644 index 13035b74436..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(bool val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - bool b = false; - os << b; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - bool b = false; - os << b; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - bool b = true; - os << b; - assert(sb.str() == "1"); - } - { - testbuf sb; - std::ostream os(&sb); - boolalpha(os); - bool b = true; - os << b; - assert(sb.str() == "true"); - } - { - testbuf sb; - std::ostream os(&sb); - boolalpha(os); - bool b = false; - os << b; - assert(sb.str() == "false"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp deleted file mode 100644 index 38ee37ff189..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(double val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - double n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - double n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - double n = -10; - os << n; - assert(sb.str() == "-10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - double n = -10.5; - os << n; - assert(sb.str() == "-10.5"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp deleted file mode 100644 index 1da0ac685fc..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(float val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - float n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - float n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - float n = -10; - os << n; - assert(sb.str() == "-10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - float n = -10.5; - os << n; - assert(sb.str() == "-10.5"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp deleted file mode 100644 index efcb08a3da1..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(int val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - int n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - int n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - int n = -10; - os << n; - assert(sb.str() == "-10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - int n = -10; - os << n; - assert(sb.str() == "fffffff6"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp deleted file mode 100644 index 6d617a453eb..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(long val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - long n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - long n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - long n = -10; - os << n; - assert(sb.str() == "-10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - long n = 0xfffffff6; - os << n; - assert(sb.str() == "fffffff6"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp deleted file mode 100644 index 20b20b2231a..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(long double val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - long double n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - long double n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - long double n = -10; - os << n; - assert(sb.str() == "-10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - long double n = -10.5; - os << n; - assert(sb.str() == "-10.5"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp deleted file mode 100644 index dc77eb72192..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(long long val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - long long n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - long long n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - long long n = -10; - os << n; - assert(sb.str() == "-10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - long long n = -10; - os << n; - assert(sb.str() == "fffffffffffffff6"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp deleted file mode 100644 index 114bba94c3f..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp +++ /dev/null @@ -1,82 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(const void* val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - const void* n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - const void* n = 0; - os << n; - assert(os.good()); - // %p is implementation defined. - // On some platforms (Windows), it's a hex number without - // any leading 0x like prefix. - // In that format, we assume a null pointer will yield 2 '0' hex digits - // for each 8 bits of address space. - assert(sb.str() == "0x0" || sb.str() == "(nil)" || - sb.str() == std::string(sizeof(void*)*2,'0')); - } - { - testbuf sb; - std::ostream os(&sb); - const void* n = &sb; - os << n; - assert(os.good()); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp deleted file mode 100644 index ebd349bcbb7..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(short val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - short n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - short n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - short n = -10; - os << n; - assert(sb.str() == "-10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - short n = -10; - os << n; - assert(sb.str() == "fff6"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp deleted file mode 100644 index ac60fa9c197..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(unsigned int val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - unsigned int n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned int n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned int n = 10; - os << n; - assert(sb.str() == "10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - unsigned int n = 0xFFF6; - os << n; - assert(sb.str() == "fff6"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp deleted file mode 100644 index b5a38017dce..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(unsigned long val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - unsigned long n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned long n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned long n = 10; - os << n; - assert(sb.str() == "10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - unsigned long n = 0xfffffff6; - os << n; - assert(sb.str() == "fffffff6"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp deleted file mode 100644 index 25dc4d83497..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(unsigned long long val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - unsigned long long n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned long long n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned long long n = 10; - os << n; - assert(sb.str() == "10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - unsigned long long n = -10; - os << n; - assert(sb.str() == "fffffffffffffff6"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp deleted file mode 100644 index 7c28a8ee79c..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// operator<<(unsigned short val); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - unsigned short n = 0; - os << n; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned short n = 0; - os << n; - assert(sb.str() == "0"); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned short n = 10; - os << n; - assert(sb.str() == "10"); - } - { - testbuf sb; - std::ostream os(&sb); - hex(os); - unsigned short n = 0xFFF6; - os << n; - assert(sb.str() == "fff6"); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp deleted file mode 100644 index f74e2a4abd9..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, charT c); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::wostream os((std::wstreambuf*)0); - wchar_t c = L'a'; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::wostream os(&sb); - wchar_t c = L'a'; - os << c; - assert(sb.str() == L"a"); - } - { - testbuf sb; - std::wostream os(&sb); - os.width(5); - wchar_t c = L'a'; - os << c; - assert(sb.str() == L" a"); - assert(os.width() == 0); - } - { - testbuf sb; - std::wostream os(&sb); - os.width(5); - left(os); - wchar_t c = L'a'; - os << c; - assert(sb.str() == L"a "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp deleted file mode 100644 index 2b78fa75aa3..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, const charT* s); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::wostream os((std::wstreambuf*)0); - const wchar_t* c = L"123"; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::wostream os(&sb); - const wchar_t* c = L"123"; - os << c; - assert(sb.str() == L"123"); - } - { - testbuf sb; - std::wostream os(&sb); - os.width(5); - const wchar_t* c = L"123"; - os << c; - assert(sb.str() == L" 123"); - assert(os.width() == 0); - } - { - testbuf sb; - std::wostream os(&sb); - os.width(5); - left(os); - const wchar_t* c = L"123"; - os << c; - assert(sb.str() == L"123 "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp deleted file mode 100644 index 253b524308c..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, char c); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - char c = 'a'; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - char c = 'a'; - os << c; - assert(sb.str() == "a"); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - char c = 'a'; - os << c; - assert(sb.str() == " a"); - assert(os.width() == 0); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - left(os); - char c = 'a'; - os << c; - assert(sb.str() == "a "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp deleted file mode 100644 index c544554ae0e..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, const char* s); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - const char* c = "123"; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - const char* c = "123"; - os << c; - assert(sb.str() == "123"); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - const char* c = "123"; - os << c; - assert(sb.str() == " 123"); - assert(os.width() == 0); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - left(os); - const char* c = "123"; - os << c; - assert(sb.str() == "123 "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp deleted file mode 100644 index 6449a13a642..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, char c); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::wostream os((std::wstreambuf*)0); - char c = 'a'; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::wostream os(&sb); - char c = 'a'; - os << c; - assert(sb.str() == L"a"); - } - { - testbuf sb; - std::wostream os(&sb); - os.width(5); - char c = 'a'; - os << c; - assert(sb.str() == L" a"); - assert(os.width() == 0); - } - { - testbuf sb; - std::wostream os(&sb); - os.width(5); - left(os); - char c = 'a'; - os << c; - assert(sb.str() == L"a "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp deleted file mode 100644 index e679a5c48ba..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, const char* s); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::wostream os((std::wstreambuf*)0); - const char* c = "123"; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::wostream os(&sb); - const char* c = "123"; - os << c; - assert(sb.str() == L"123"); - } - { - testbuf sb; - std::wostream os(&sb); - os.width(5); - const char* c = "123"; - os << c; - assert(sb.str() == L" 123"); - assert(os.width() == 0); - } - { - testbuf sb; - std::wostream os(&sb); - os.width(5); - left(os); - const char* c = "123"; - os << c; - assert(sb.str() == L"123 "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp deleted file mode 100644 index dc0ee4266c7..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, signed char c); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - signed char c = 'a'; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - signed char c = 'a'; - os << c; - assert(sb.str() == "a"); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - signed char c = 'a'; - os << c; - assert(sb.str() == " a"); - assert(os.width() == 0); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - left(os); - signed char c = 'a'; - os << c; - assert(sb.str() == "a "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp deleted file mode 100644 index e465b94b6b9..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, const signed char* s); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - const signed char* c = (const signed char*)"123"; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - const signed char* c = (const signed char*)"123"; - os << c; - assert(sb.str() == "123"); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - const signed char* c = (const signed char*)"123"; - os << c; - assert(sb.str() == " 123"); - assert(os.width() == 0); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - left(os); - const signed char* c = (const signed char*)"123"; - os << c; - assert(sb.str() == "123 "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp deleted file mode 100644 index d818c5f358f..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, unsigned char c); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - unsigned char c = 'a'; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - unsigned char c = 'a'; - os << c; - assert(sb.str() == "a"); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - unsigned char c = 'a'; - os << c; - assert(sb.str() == " a"); - assert(os.width() == 0); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - left(os); - unsigned char c = 'a'; - os << c; - assert(sb.str() == "a "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp deleted file mode 100644 index 3257f4a776c..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& operator<<(basic_ostream& out, const unsigned char* s); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - const unsigned char* c = (const unsigned char*)"123"; - os << c; - assert(os.bad()); - assert(os.fail()); - } - { - testbuf sb; - std::ostream os(&sb); - const unsigned char* c = (const unsigned char*)"123"; - os << c; - assert(sb.str() == "123"); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - const unsigned char* c = (const unsigned char*)"123"; - os << c; - assert(sb.str() == " 123"); - assert(os.width() == 0); - } - { - testbuf sb; - std::ostream os(&sb); - os.width(5); - left(os); - const unsigned char* c = (const unsigned char*)"123"; - os << c; - assert(sb.str() == "123 "); - assert(os.width() == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp deleted file mode 100644 index e26466e13f6..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& operator<<(basic_ios& -// (*pf)(basic_ios&)); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -template -std::basic_ios& -f(std::basic_ios& os) -{ - std::uppercase(os); - return os; -} - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - assert(!(os.flags() & std::ios_base::uppercase)); - os << f; - assert( (os.flags() & std::ios_base::uppercase)); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp deleted file mode 100644 index 238a6210824..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& operator<<(ios_base& (*pf)(ios_base&)); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - assert(!(os.flags() & std::ios_base::uppercase)); - os << std::uppercase; - assert( (os.flags() & std::ios_base::uppercase)); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp deleted file mode 100644 index 3ed400a705c..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& operator<< -// (basic_ostream& (*pf)(basic_ostream&)) - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -template -std::basic_ostream& -f(std::basic_ostream& os) -{ - os << "testing..."; - return os; -} - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - os << f; - assert(sb.str() == "testing..."); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp deleted file mode 100644 index 1cb9413a7cc..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& operator<<(basic_streambuf* sb); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - testbuf(const std::basic_string& str) - : str_(str) - { - base::setg(const_cast(str_.data()), - const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - testbuf sb2("testing..."); - assert(sb.str() == ""); - os << &sb2; - assert(sb.str() == "testing..."); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp deleted file mode 100644 index d503544a97f..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp +++ /dev/null @@ -1,80 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& endl(basic_ostream& os); - -#include -#include - -int sync_called = 0; - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } - - virtual int - sync() - { - ++sync_called; - return 0; - } -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - endl(os); - assert(sb.str() == "\n"); - assert(sync_called == 1); - assert(os.good()); - } - { - testbuf sb; - std::wostream os(&sb); - endl(os); - assert(sb.str() == L"\n"); - assert(sync_called == 2); - assert(os.good()); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp deleted file mode 100644 index 975b660b477..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp +++ /dev/null @@ -1,71 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& ends(basic_ostream& os); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - ends(os); - assert(sb.str().size() == 1); - assert(sb.str().back() == 0); - assert(os.good()); - } - { - testbuf sb; - std::wostream os(&sb); - ends(os); - assert(sb.str().size() == 1); - assert(sb.str().back() == 0); - assert(os.good()); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/flush.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/flush.pass.cpp deleted file mode 100644 index 088826c3d5a..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.manip/flush.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& flush(basic_ostream& os); - -#include -#include - -int sync_called = 0; - -template -class testbuf - : public std::basic_streambuf -{ -public: - testbuf() - { - } - -protected: - - virtual int - sync() - { - ++sync_called; - return 0; - } -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - flush(os); - assert(sync_called == 1); - assert(os.good()); - } - { - testbuf sb; - std::wostream os(&sb); - flush(os); - assert(sync_called == 2); - assert(os.good()); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp deleted file mode 100644 index ec0e8e1e8c7..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp +++ /dev/null @@ -1,72 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// template -// basic_ostream& -// operator<<(basic_ostream&& os, const T& x); - -#include -#include - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - testbuf sb; - std::ostream(&sb) << "testing..."; - assert(sb.str() == "testing..."); - } - { - testbuf sb; - std::wostream(&sb) << L"123"; - assert(sb.str() == L"123"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp deleted file mode 100644 index e09627b29b6..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& seekp(pos_type pos); - -#include -#include - -int seekpos_called = 0; - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - testbuf() {} - -protected: - - typename base::pos_type - seekpos(typename base::pos_type sp, std::ios_base::openmode which) - { - ++seekpos_called; - assert(which == std::ios_base::out); - return sp; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - assert(&os.seekp(5) == &os); - assert(seekpos_called == 0); - } - { - testbuf sb; - std::ostream os(&sb); - assert(&os.seekp(10) == &os); - assert(seekpos_called == 1); - assert(os.good()); - assert(&os.seekp(-1) == &os); - assert(seekpos_called == 2); - assert(os.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp deleted file mode 100644 index 69b26f3a96e..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& seekp(off_type off, ios_base::seekdir dir); - -#include -#include - -int seekoff_called = 0; - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - testbuf() {} - -protected: - - typename base::pos_type - seekoff(typename base::off_type off, std::ios_base::seekdir way, - std::ios_base::openmode which) - { - ++seekoff_called; - assert(way == std::ios_base::beg); - assert(which == std::ios_base::out); - return off; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - assert(&os.seekp(5, std::ios_base::beg) == &os); - assert(seekoff_called == 0); - } - { - testbuf sb; - std::ostream os(&sb); - assert(&os.seekp(10, std::ios_base::beg) == &os); - assert(seekoff_called == 1); - assert(os.good()); - assert(&os.seekp(-1, std::ios_base::beg) == &os); - assert(seekoff_called == 2); - assert(os.fail()); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp deleted file mode 100644 index 10a229d382b..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// pos_type tellp(); - -#include -#include - -int seekoff_called = 0; - -template -struct testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - testbuf() {} - -protected: - - typename base::pos_type - seekoff(typename base::off_type off, std::ios_base::seekdir way, std::ios_base::openmode which) - { - assert(off == 0); - assert(way == std::ios_base::cur); - assert(which == std::ios_base::out); - ++seekoff_called; - return 10; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - assert(os.tellp() == -1); - } - { - testbuf sb; - std::ostream os(&sb); - assert(os.tellp() == 10); - assert(seekoff_called == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/flush.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/flush.pass.cpp deleted file mode 100644 index 97791f4c7a9..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/flush.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& flush(); - -#include -#include - -int sync_called = 0; - -template -class testbuf - : public std::basic_streambuf -{ -public: - testbuf() - { - } - -protected: - - virtual int - sync() - { - if (sync_called++ == 1) - return -1; - return 0; - } -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - os.flush(); - assert(os.good()); - assert(sync_called == 1); - os.flush(); - assert(os.bad()); - assert(sync_called == 2); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp deleted file mode 100644 index 396bb093f9c..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& put(char_type c); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::wostream os((std::wstreambuf*)0); - wchar_t c = L'a'; - os.put(c); - assert(os.bad()); - } - { - testbuf sb; - std::wostream os(&sb); - wchar_t c = L'a'; - os.put(c); - assert(sb.str() == L"a"); - assert(os.good()); - } - { - testbuf sb; - std::ostream os(&sb); - char c = 'a'; - os.put(c); - assert(sb.str() == "a"); - assert(os.good()); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp deleted file mode 100644 index 8dd4e4cf76a..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream; - -// basic_ostream& write(const char_type* s, streamsize n); - -#include -#include - -template -class testbuf - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - std::basic_string str_; -public: - testbuf() - { - } - - std::basic_string str() const - {return std::basic_string(base::pbase(), base::pptr());} - -protected: - - virtual typename base::int_type - overflow(typename base::int_type __c = base::traits_type::eof()) - { - if (__c != base::traits_type::eof()) - { - int n = str_.size(); - str_.push_back(__c); - str_.resize(str_.capacity()); - base::setp(const_cast(str_.data()), - const_cast(str_.data() + str_.size())); - base::pbump(n+1); - } - return __c; - } -}; - -int main() -{ - { - std::wostream os((std::wstreambuf*)0); - const wchar_t s[] = L"123456790"; - os.write(s, sizeof(s)/sizeof(s[0])-1); - assert(os.bad()); - } - { - testbuf sb; - std::wostream os(&sb); - const wchar_t s[] = L"123456790"; - os.write(s, sizeof(s)/sizeof(s[0])-1); - assert(os.good()); - assert(sb.str() == s); - } - { - testbuf sb; - std::ostream os(&sb); - const char s[] = "123456790"; - os.write(s, sizeof(s)/sizeof(s[0])-1); - assert(sb.str() == s); - assert(os.good()); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream/types.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream/types.pass.cpp deleted file mode 100644 index 41ce0346c48..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream/types.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream -// : virtual public basic_ios -// { -// public: -// // types (inherited from basic_ios (27.5.4)): -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_ostream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp deleted file mode 100644 index 991fdfb3572..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream::sentry; - -// explicit sentry(basic_ostream& os); - -#include -#include - -int sync_called = 0; - -template -struct testbuf1 - : public std::basic_streambuf -{ - testbuf1() {} - -protected: - - int virtual sync() - { - ++sync_called; - return 1; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - std::ostream::sentry s(os); - assert(!bool(s)); - } - { - testbuf1 sb; - std::ostream os(&sb); - std::ostream::sentry s(os); - assert(bool(s)); - } - { - testbuf1 sb; - std::ostream os(&sb); - testbuf1 sb2; - std::ostream os2(&sb2); - os.tie(&os2); - assert(sync_called == 0); - std::ostream::sentry s(os); - assert(bool(s)); - assert(sync_called == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp deleted file mode 100644 index 112928ca0ce..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ostream::sentry; - -// ~sentry(); - -#include -#include - -int sync_called = 0; - -template -struct testbuf1 - : public std::basic_streambuf -{ - testbuf1() {} - -protected: - - int virtual sync() - { - ++sync_called; - return 1; - } -}; - -int main() -{ - { - std::ostream os((std::streambuf*)0); - std::ostream::sentry s(os); - assert(!bool(s)); - } - assert(sync_called == 0); - { - testbuf1 sb; - std::ostream os(&sb); - std::ostream::sentry s(os); - assert(bool(s)); - } - assert(sync_called == 0); - { - testbuf1 sb; - std::ostream os(&sb); - std::ostream::sentry s(os); - assert(bool(s)); - unitbuf(os); - } - assert(sync_called == 1); - { - testbuf1 sb; - std::ostream os(&sb); - try - { - std::ostream::sentry s(os); - assert(bool(s)); - unitbuf(os); - throw 1; - } - catch (...) - { - } - assert(sync_called == 1); - } -} diff --git a/libcxx/test/input.output/iostream.format/output.streams/version.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/version.pass.cpp deleted file mode 100644 index 662b6987b3c..00000000000 --- a/libcxx/test/input.output/iostream.format/output.streams/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp b/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp deleted file mode 100644 index d09b3cae4f6..00000000000 --- a/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp +++ /dev/null @@ -1,219 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// quoted - -#include -#include -#include -#include - -#if _LIBCPP_STD_VER > 11 - -bool is_skipws ( const std::istream *is ) { - return ( is->flags() & std::ios_base::skipws ) != 0; - } - - -bool is_skipws ( const std::wistream *is ) { - return ( is->flags() & std::ios_base::skipws ) != 0; - } - -void both_ways ( const char *p ) { - std::string str(p); - auto q = std::quoted(str); - - std::stringstream ss; - bool skippingws = is_skipws ( &ss ); - ss << q; - ss >> q; - } - -void round_trip ( const char *p ) { - std::stringstream ss; - bool skippingws = is_skipws ( &ss ); - ss << std::quoted(p); - std::string s; - ss >> std::quoted(s); - assert ( s == p ); - assert ( skippingws == is_skipws ( &ss )); - } - -void round_trip_ws ( const char *p ) { - std::stringstream ss; - std::noskipws ( ss ); - bool skippingws = is_skipws ( &ss ); - ss << std::quoted(p); - std::string s; - ss >> std::quoted(s); - assert ( s == p ); - assert ( skippingws == is_skipws ( &ss )); - } - -void round_trip_d ( const char *p, char delim ) { - std::stringstream ss; - ss << std::quoted(p, delim); - std::string s; - ss >> std::quoted(s, delim); - assert ( s == p ); - } - -void round_trip_e ( const char *p, char escape ) { - std::stringstream ss; - ss << std::quoted(p, '"', escape ); - std::string s; - ss >> std::quoted(s, '"', escape ); - assert ( s == p ); - } - - - -std::string quote ( const char *p, char delim='"', char escape='\\' ) { - std::stringstream ss; - ss << std::quoted(p, delim, escape); - std::string s; - ss >> s; // no quote - return s; -} - -std::string unquote ( const char *p, char delim='"', char escape='\\' ) { - std::stringstream ss; - ss << p; - std::string s; - ss >> std::quoted(s, delim, escape); - return s; -} - -void test_padding () { - { - std::stringstream ss; - ss << std::left << std::setw(10) << std::setfill('!') << std::quoted("abc", '`'); - assert ( ss.str() == "`abc`!!!!!" ); - } - - { - std::stringstream ss; - ss << std::right << std::setw(10) << std::setfill('!') << std::quoted("abc", '`'); - assert ( ss.str() == "!!!!!`abc`" ); - } -} - - -void round_trip ( const wchar_t *p ) { - std::wstringstream ss; - bool skippingws = is_skipws ( &ss ); - ss << std::quoted(p); - std::wstring s; - ss >> std::quoted(s); - assert ( s == p ); - assert ( skippingws == is_skipws ( &ss )); - } - - -void round_trip_ws ( const wchar_t *p ) { - std::wstringstream ss; - std::noskipws ( ss ); - bool skippingws = is_skipws ( &ss ); - ss << std::quoted(p); - std::wstring s; - ss >> std::quoted(s); - assert ( s == p ); - assert ( skippingws == is_skipws ( &ss )); - } - -void round_trip_d ( const wchar_t *p, wchar_t delim ) { - std::wstringstream ss; - ss << std::quoted(p, delim); - std::wstring s; - ss >> std::quoted(s, delim); - assert ( s == p ); - } - -void round_trip_e ( const wchar_t *p, wchar_t escape ) { - std::wstringstream ss; - ss << std::quoted(p, wchar_t('"'), escape ); - std::wstring s; - ss >> std::quoted(s, wchar_t('"'), escape ); - assert ( s == p ); - } - - -std::wstring quote ( const wchar_t *p, wchar_t delim='"', wchar_t escape='\\' ) { - std::wstringstream ss; - ss << std::quoted(p, delim, escape); - std::wstring s; - ss >> s; // no quote - return s; -} - -std::wstring unquote ( const wchar_t *p, wchar_t delim='"', wchar_t escape='\\' ) { - std::wstringstream ss; - ss << p; - std::wstring s; - ss >> std::quoted(s, delim, escape); - return s; -} - -int main() -{ - both_ways ( "" ); // This is a compilation check - - round_trip ( "" ); - round_trip_ws ( "" ); - round_trip_d ( "", 'q' ); - round_trip_e ( "", 'q' ); - - round_trip ( L"" ); - round_trip_ws ( L"" ); - round_trip_d ( L"", 'q' ); - round_trip_e ( L"", 'q' ); - - round_trip ( "Hi" ); - round_trip_ws ( "Hi" ); - round_trip_d ( "Hi", '!' ); - round_trip_e ( "Hi", '!' ); - assert ( quote ( "Hi", '!' ) == "!Hi!" ); - assert ( quote ( "Hi!", '!' ) == R"(!Hi\!!)" ); - - round_trip ( L"Hi" ); - round_trip_ws ( L"Hi" ); - round_trip_d ( L"Hi", '!' ); - round_trip_e ( L"Hi", '!' ); - assert ( quote ( L"Hi", '!' ) == L"!Hi!" ); - assert ( quote ( L"Hi!", '!' ) == LR"(!Hi\!!)" ); - - round_trip ( "Hi Mom" ); - round_trip_ws ( "Hi Mom" ); - round_trip ( L"Hi Mom" ); - round_trip_ws ( L"Hi Mom" ); - - assert ( quote ( "" ) == "\"\"" ); - assert ( quote ( L"" ) == L"\"\"" ); - assert ( quote ( "a" ) == "\"a\"" ); - assert ( quote ( L"a" ) == L"\"a\"" ); - -// missing end quote - must not hang - assert ( unquote ( "\"abc" ) == "abc" ); - assert ( unquote ( L"\"abc" ) == L"abc" ); - - assert ( unquote ( "abc" ) == "abc" ); // no delimiter - assert ( unquote ( L"abc" ) == L"abc" ); // no delimiter - assert ( unquote ( "abc def" ) == "abc" ); // no delimiter - assert ( unquote ( L"abc def" ) == L"abc" ); // no delimiter - - assert ( unquote ( "" ) == "" ); // nothing there - assert ( unquote ( L"" ) == L"" ); // nothing there - test_padding (); - } - -#else -int main() {} -#endif diff --git a/libcxx/test/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp b/libcxx/test/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp deleted file mode 100644 index 2f516f8fbc9..00000000000 --- a/libcxx/test/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// quoted - -#include -#include -#include -#include - -#if _LIBCPP_STD_VER > 11 - -void round_trip ( const char *p ) { - std::wstringstream ss; - ss << std::quoted(p); - std::string s; - ss >> std::quoted(s); - } - - - -int main() -{ - round_trip ( "Hi Mom" ); -} -#else -#error -#endif diff --git a/libcxx/test/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp b/libcxx/test/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp deleted file mode 100644 index bdd362df19c..00000000000 --- a/libcxx/test/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// quoted - -#include -#include -#include -#include - -#if _LIBCPP_STD_VER > 11 - -template -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); - } - - - -int main() -{ - round_trip ( "Hi Mom" ); -} -#else -#error -#endif diff --git a/libcxx/test/input.output/iostream.format/std.manip/resetiosflags.pass.cpp b/libcxx/test/input.output/iostream.format/std.manip/resetiosflags.pass.cpp deleted file mode 100644 index 6c01fc057da..00000000000 --- a/libcxx/test/input.output/iostream.format/std.manip/resetiosflags.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// T1 resetiosflags(ios_base::fmtflags mask); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::istream is(&sb); - assert(is.flags() & std::ios_base::skipws); - is >> std::resetiosflags(std::ios_base::skipws); - assert(!(is.flags() & std::ios_base::skipws)); - } - { - testbuf sb; - std::ostream os(&sb); - assert(os.flags() & std::ios_base::skipws); - os << std::resetiosflags(std::ios_base::skipws); - assert(!(os.flags() & std::ios_base::skipws)); - } - { - testbuf sb; - std::wistream is(&sb); - assert(is.flags() & std::ios_base::skipws); - is >> std::resetiosflags(std::ios_base::skipws); - assert(!(is.flags() & std::ios_base::skipws)); - } - { - testbuf sb; - std::wostream os(&sb); - assert(os.flags() & std::ios_base::skipws); - os << std::resetiosflags(std::ios_base::skipws); - assert(!(os.flags() & std::ios_base::skipws)); - } -} diff --git a/libcxx/test/input.output/iostream.format/std.manip/setbase.pass.cpp b/libcxx/test/input.output/iostream.format/std.manip/setbase.pass.cpp deleted file mode 100644 index e2776a5d1ab..00000000000 --- a/libcxx/test/input.output/iostream.format/std.manip/setbase.pass.cpp +++ /dev/null @@ -1,74 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// T3 setbase(int base); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::istream is(&sb); - is >> std::setbase(8); - assert((is.flags() & std::ios_base::basefield) == std::ios_base::oct); - is >> std::setbase(10); - assert((is.flags() & std::ios_base::basefield) == std::ios_base::dec); - is >> std::setbase(16); - assert((is.flags() & std::ios_base::basefield) == std::ios_base::hex); - is >> std::setbase(15); - assert((is.flags() & std::ios_base::basefield) == 0); - } - { - testbuf sb; - std::ostream os(&sb); - os << std::setbase(8); - assert((os.flags() & std::ios_base::basefield) == std::ios_base::oct); - os << std::setbase(10); - assert((os.flags() & std::ios_base::basefield) == std::ios_base::dec); - os << std::setbase(16); - assert((os.flags() & std::ios_base::basefield) == std::ios_base::hex); - os << std::setbase(15); - assert((os.flags() & std::ios_base::basefield) == 0); - } - { - testbuf sb; - std::wistream is(&sb); - is >> std::setbase(8); - assert((is.flags() & std::ios_base::basefield) == std::ios_base::oct); - is >> std::setbase(10); - assert((is.flags() & std::ios_base::basefield) == std::ios_base::dec); - is >> std::setbase(16); - assert((is.flags() & std::ios_base::basefield) == std::ios_base::hex); - is >> std::setbase(15); - assert((is.flags() & std::ios_base::basefield) == 0); - } - { - testbuf sb; - std::wostream os(&sb); - os << std::setbase(8); - assert((os.flags() & std::ios_base::basefield) == std::ios_base::oct); - os << std::setbase(10); - assert((os.flags() & std::ios_base::basefield) == std::ios_base::dec); - os << std::setbase(16); - assert((os.flags() & std::ios_base::basefield) == std::ios_base::hex); - os << std::setbase(15); - assert((os.flags() & std::ios_base::basefield) == 0); - } -} diff --git a/libcxx/test/input.output/iostream.format/std.manip/setfill.pass.cpp b/libcxx/test/input.output/iostream.format/std.manip/setfill.pass.cpp deleted file mode 100644 index a4d923d70ad..00000000000 --- a/libcxx/test/input.output/iostream.format/std.manip/setfill.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template T4 setfill(charT c); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::ostream os(&sb); - os << std::setfill('*'); - assert(os.fill() == '*'); - } - { - testbuf sb; - std::wostream os(&sb); - os << std::setfill(L'*'); - assert(os.fill() == L'*'); - } -} diff --git a/libcxx/test/input.output/iostream.format/std.manip/setiosflags.pass.cpp b/libcxx/test/input.output/iostream.format/std.manip/setiosflags.pass.cpp deleted file mode 100644 index 5aaf38444ab..00000000000 --- a/libcxx/test/input.output/iostream.format/std.manip/setiosflags.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// T2 setiosflags (ios_base::fmtflags mask); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::istream is(&sb); - assert(!(is.flags() & std::ios_base::oct)); - is >> std::setiosflags(std::ios_base::oct); - assert(is.flags() & std::ios_base::oct); - } - { - testbuf sb; - std::ostream os(&sb); - assert(!(os.flags() & std::ios_base::oct)); - os << std::setiosflags(std::ios_base::oct); - assert(os.flags() & std::ios_base::oct); - } - { - testbuf sb; - std::wistream is(&sb); - assert(!(is.flags() & std::ios_base::oct)); - is >> std::setiosflags(std::ios_base::oct); - assert(is.flags() & std::ios_base::oct); - } - { - testbuf sb; - std::wostream os(&sb); - assert(!(os.flags() & std::ios_base::oct)); - os << std::setiosflags(std::ios_base::oct); - assert(os.flags() & std::ios_base::oct); - } -} diff --git a/libcxx/test/input.output/iostream.format/std.manip/setprecision.pass.cpp b/libcxx/test/input.output/iostream.format/std.manip/setprecision.pass.cpp deleted file mode 100644 index 0bea4b98623..00000000000 --- a/libcxx/test/input.output/iostream.format/std.manip/setprecision.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// T5 setprecision(int n); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::istream is(&sb); - is >> std::setprecision(10); - assert(is.precision() == 10); - } - { - testbuf sb; - std::ostream os(&sb); - os << std::setprecision(10); - assert(os.precision() == 10); - } - { - testbuf sb; - std::wistream is(&sb); - is >> std::setprecision(10); - assert(is.precision() == 10); - } - { - testbuf sb; - std::wostream os(&sb); - os << std::setprecision(10); - assert(os.precision() == 10); - } -} diff --git a/libcxx/test/input.output/iostream.format/std.manip/setw.pass.cpp b/libcxx/test/input.output/iostream.format/std.manip/setw.pass.cpp deleted file mode 100644 index 9bd96984e5c..00000000000 --- a/libcxx/test/input.output/iostream.format/std.manip/setw.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// T6 setw(int n); - -#include -#include - -template -struct testbuf - : public std::basic_streambuf -{ - testbuf() {} -}; - -int main() -{ - { - testbuf sb; - std::istream is(&sb); - is >> std::setw(10); - assert(is.width() == 10); - } - { - testbuf sb; - std::ostream os(&sb); - os << std::setw(10); - assert(os.width() == 10); - } - { - testbuf sb; - std::wistream is(&sb); - is >> std::setw(10); - assert(is.width() == 10); - } - { - testbuf sb; - std::wostream os(&sb); - os << std::setw(10); - assert(os.width() == 10); - } -} diff --git a/libcxx/test/input.output/iostream.format/std.manip/version.pass.cpp b/libcxx/test/input.output/iostream.format/std.manip/version.pass.cpp deleted file mode 100644 index ca4fd3d463e..00000000000 --- a/libcxx/test/input.output/iostream.format/std.manip/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.forward/iosfwd.pass.cpp b/libcxx/test/input.output/iostream.forward/iosfwd.pass.cpp deleted file mode 100644 index 7250c2adb27..00000000000 --- a/libcxx/test/input.output/iostream.forward/iosfwd.pass.cpp +++ /dev/null @@ -1,142 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include -#include // for mbstate_t - -int main() -{ - { - std::char_traits* t1 = 0; - std::char_traits* t2 = 0; - std::char_traits* t3 = 0; - } - { - std::basic_ios* t1 = 0; - std::basic_ios* t2 = 0; - std::basic_ios* t3 = 0; - } - { - std::basic_streambuf* t1 = 0; - std::basic_streambuf* t2 = 0; - std::basic_streambuf* t3 = 0; - } - { - std::basic_istream* t1 = 0; - std::basic_istream* t2 = 0; - std::basic_istream* t3 = 0; - } - { - std::basic_ostream* t1 = 0; - std::basic_ostream* t2 = 0; - std::basic_ostream* t3 = 0; - } - { - std::basic_iostream* t1 = 0; - std::basic_iostream* t2 = 0; - std::basic_iostream* t3 = 0; - } - { - std::basic_stringbuf* t1 = 0; - std::basic_stringbuf* t2 = 0; - std::basic_stringbuf* t3 = 0; - } - { - std::basic_istringstream* t1 = 0; - std::basic_istringstream* t2 = 0; - std::basic_istringstream* t3 = 0; - } - { - std::basic_ostringstream* t1 = 0; - std::basic_ostringstream* t2 = 0; - std::basic_ostringstream* t3 = 0; - } - { - std::basic_stringstream* t1 = 0; - std::basic_stringstream* t2 = 0; - std::basic_stringstream* t3 = 0; - } - { - std::basic_filebuf* t1 = 0; - std::basic_filebuf* t2 = 0; - std::basic_filebuf* t3 = 0; - } - { - std::basic_ifstream* t1 = 0; - std::basic_ifstream* t2 = 0; - std::basic_ifstream* t3 = 0; - } - { - std::basic_ofstream* t1 = 0; - std::basic_ofstream* t2 = 0; - std::basic_ofstream* t3 = 0; - } - { - std::basic_fstream* t1 = 0; - std::basic_fstream* t2 = 0; - std::basic_fstream* t3 = 0; - } - { - std::istreambuf_iterator* t1 = 0; - std::istreambuf_iterator* t2 = 0; - std::istreambuf_iterator* t3 = 0; - } - { - std::ostreambuf_iterator* t1 = 0; - std::ostreambuf_iterator* t2 = 0; - std::ostreambuf_iterator* t3 = 0; - } - { - std::ios* t1 = 0; - std::wios* t2 = 0; - } - { - std::streambuf* t1 = 0; - std::istream* t2 = 0; - std::ostream* t3 = 0; - std::iostream* t4 = 0; - } - { - std::stringbuf* t1 = 0; - std::istringstream* t2 = 0; - std::ostringstream* t3 = 0; - std::stringstream* t4 = 0; - } - { - std::filebuf* t1 = 0; - std::ifstream* t2 = 0; - std::ofstream* t3 = 0; - std::fstream* t4 = 0; - } - { - std::wstreambuf* t1 = 0; - std::wistream* t2 = 0; - std::wostream* t3 = 0; - std::wiostream* t4 = 0; - } - { - std::wstringbuf* t1 = 0; - std::wistringstream* t2 = 0; - std::wostringstream* t3 = 0; - std::wstringstream* t4 = 0; - } - { - std::wfilebuf* t1 = 0; - std::wifstream* t2 = 0; - std::wofstream* t3 = 0; - std::wfstream* t4 = 0; - } - { - std::fpos* t1 = 0; - std::streampos* t2 = 0; - std::wstreampos* t3 = 0; - } -} diff --git a/libcxx/test/input.output/iostream.forward/version.pass.cpp b/libcxx/test/input.output/iostream.forward/version.pass.cpp deleted file mode 100644 index cf91332d559..00000000000 --- a/libcxx/test/input.output/iostream.forward/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp b/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp deleted file mode 100644 index 9206d173fc0..00000000000 --- a/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// istream cerr; - -#include -#include - -int main() -{ -#if 0 - std::cerr << "Hello World!\n"; -#else - assert(std::cerr.tie() == &std::cout); - assert(std::cerr.flags() & std::ios_base::unitbuf); -#endif // 0 -} diff --git a/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp b/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp deleted file mode 100644 index 3481598aed9..00000000000 --- a/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// istream cin; - -#include -#include - -int main() -{ -#if 0 - std::cout << "Hello World!\n"; - int i; - std::cout << "Enter a number: "; - std::cin >> i; - std::cout << "The number is : " << i << '\n'; -#else // 0 - assert(std::cin.tie() == &std::cout); -#endif -} diff --git a/libcxx/test/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp b/libcxx/test/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp deleted file mode 100644 index 3812b203ae0..00000000000 --- a/libcxx/test/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// istream clog; - -#include - -int main() -{ -#if 0 - std::clog << "Hello World!\n"; -#else - (void)std::clog; -#endif -} diff --git a/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp b/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp deleted file mode 100644 index 6000ae274b9..00000000000 --- a/libcxx/test/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// istream cout; - -#include - -int main() -{ -#if 0 - std::cout << "Hello World!\n"; - int i; - std::cout << "Enter a number: "; - std::cin >> i; - std::cout << "The number is : " << i << '\n'; -#else // 0 - (void)std::cout; -#endif -} diff --git a/libcxx/test/input.output/iostream.objects/version.pass.cpp b/libcxx/test/input.output/iostream.objects/version.pass.cpp deleted file mode 100644 index 09b3611f6df..00000000000 --- a/libcxx/test/input.output/iostream.objects/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp b/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp deleted file mode 100644 index 19a1dcdcdb4..00000000000 --- a/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// istream wcerr; - -#include -#include - -int main() -{ -#if 0 - std::wcerr << L"Hello World!\n"; -#else - assert(std::wcerr.tie() == &std::wcout); - assert(std::wcerr.flags() & std::ios_base::unitbuf); -#endif // 0 -} diff --git a/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp b/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp deleted file mode 100644 index 90a56685a67..00000000000 --- a/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// istream wcin; - -#include -#include - -int main() -{ -#if 0 - std::wcout << L"Hello World!\n"; - int i; - std::wcout << L"Enter a number: "; - std::wcin >> i; - std::wcout << L"The number is : " << i << L'\n'; -#else // 0 - assert(std::wcin.tie() == &std::wcout); -#endif -} diff --git a/libcxx/test/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp b/libcxx/test/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp deleted file mode 100644 index 61ff5fb5089..00000000000 --- a/libcxx/test/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// istream wclog; - -#include - -int main() -{ -#if 0 - std::wclog << L"Hello World!\n"; -#else - (void)std::wclog; -#endif -} diff --git a/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp b/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp deleted file mode 100644 index 7a546aa528d..00000000000 --- a/libcxx/test/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// istream wcout; - -#include - -int main() -{ -#if 0 - std::wcout << L"Hello World!\n"; -#else - (void)std::wcout; -#endif -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/fpos.members/state.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/fpos.members/state.pass.cpp deleted file mode 100644 index 1da6d4406c9..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/fpos.members/state.pass.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class fpos - -// void state(stateT s); - -#include -#include - -int main() -{ - std::fpos f; - f.state(3); - assert(f.state() == 3); -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp deleted file mode 100644 index a602e3e94be..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class fpos - -// Addition - -#include -#include - -int main() -{ - typedef std::fpos P; - P p(5); - std::streamoff o(6); - P q = p + o; - assert(q == P(11)); - p += o; - assert(p == q); -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/ctor_int.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/ctor_int.pass.cpp deleted file mode 100644 index 1b939d86e59..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/ctor_int.pass.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class fpos - -// fpos(int) - -#include -#include - -int main() -{ - typedef std::fpos P; - P p(5); - assert(p == P(5)); -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/difference.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/difference.pass.cpp deleted file mode 100644 index 47ce6870a3b..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/difference.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class fpos - -// Subraction with fpos - -#include -#include - -int main() -{ - typedef std::fpos P; - P p(11); - P q(6); - std::streamoff o = p - q; - assert(o == 5); -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/eq_int.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/eq_int.pass.cpp deleted file mode 100644 index 76f8fa12a41..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/eq_int.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class fpos - -// == and != - -#include -#include - -int main() -{ - typedef std::fpos P; - P p(5); - P q(6); - assert(p == p); - assert(p != q); -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp deleted file mode 100644 index 9c6ebd9f74e..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class fpos - -// converts to and from streamoff - -#include -#include - -int main() -{ - typedef std::fpos P; - P p(std::streamoff(7)); - std::streamoff offset(p); - assert(offset == 7); -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/streamsize.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/streamsize.pass.cpp deleted file mode 100644 index eb738b492c8..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/streamsize.pass.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// streamsize and streamoff interconvert - -#include -#include - -int main() -{ - std::streamoff o(5); - std::streamsize sz(o); - assert(sz == 5); - std::streamoff o2(sz); - assert(o == o2); -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp deleted file mode 100644 index f9e6513e4a4..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class fpos - -// Subraction with offset - -#include -#include - -int main() -{ - typedef std::fpos P; - P p(11); - std::streamoff o(6); - P q = p - o; - assert(q == P(5)); - p -= o; - assert(p == q); -} diff --git a/libcxx/test/input.output/iostreams.base/fpos/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostreams.base/fpos/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostreams.base/fpos/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/flags.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/flags.pass.cpp deleted file mode 100644 index 958fcb53d89..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/flags.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// fmtflags flags() const; - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - const test t; - assert(t.flags() == (test::skipws | test::dec)); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/flags_fmtflags.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/flags_fmtflags.pass.cpp deleted file mode 100644 index 36b5794983e..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/flags_fmtflags.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// fmtflags flags(fmtflags fmtfl); - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - test t; - assert(t.flags() == (test::skipws | test::dec)); - test::fmtflags f = t.flags(test::hex | test::right); - assert(f == (test::skipws | test::dec)); - assert(t.flags() == (test::hex | test::right)); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/precision.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/precision.pass.cpp deleted file mode 100644 index 701e3de360d..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/precision.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// streamsize precision() const; - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - const test t; - assert(t.precision() == 6); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/precision_streamsize.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/precision_streamsize.pass.cpp deleted file mode 100644 index e0d6484c8fd..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/precision_streamsize.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// streamsize precision(streamsize prec); - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - test t; - assert(t.precision() == 6); - std::streamsize p = t.precision(10); - assert(p == 6); - assert(t.precision() == 10); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags.pass.cpp deleted file mode 100644 index d9ec47b7907..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// fmtflags setf(fmtflags fmtfl) - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - test t; - assert(t.flags() == (test::skipws | test::dec)); - test::fmtflags f = t.setf(test::hex | test::right); - assert(f == (test::skipws | test::dec)); - assert(t.flags() == (test::skipws | test::dec | test::hex | test::right)); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags_mask.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags_mask.pass.cpp deleted file mode 100644 index b201377027d..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags_mask.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// fmtflags setf(fmtflags fmtfl, fmtflags mask); - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - test t; - assert(t.flags() == (test::skipws | test::dec)); - test::fmtflags f = t.setf(test::hex | test::right, test::dec | test::right); - assert(f == (test::skipws | test::dec)); - assert(t.flags() == (test::skipws | test::right)); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/unsetf_mask.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/unsetf_mask.pass.cpp deleted file mode 100644 index 163fc54a1e8..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/unsetf_mask.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// void unsetf(fmtflags mask); - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - test t; - assert(t.flags() == (test::skipws | test::dec)); - t.unsetf(test::dec | test::right); - assert(t.flags() == test::skipws); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/width.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/width.pass.cpp deleted file mode 100644 index 287c89d296e..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/width.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// streamsize width() const; - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - const test t; - assert(t.width() == 0); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/width_streamsize.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/width_streamsize.pass.cpp deleted file mode 100644 index 6e532deddf0..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/fmtflags.state/width_streamsize.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// streamsize width(streamsize wide); - -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - test t; - assert(t.width() == 0); - std::streamsize w = t.width(4); - assert(w == 0); - assert(t.width() == 4); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp deleted file mode 100644 index c0ed3150457..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// void register_callback(event_callback fn, int index); - -#include -#include -#include -#include - -#include "platform_support.h" // locale name macros - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int f1_called = 0; - -void f1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 4); - ++f1_called; - } -} - -int main() -{ - test t; - std::ios_base& b = t; - b.register_callback(f1, 4); - b.register_callback(f1, 4); - b.register_callback(f1, 4); - std::locale l = b.imbue(std::locale(LOCALE_en_US_UTF_8)); - assert(f1_called == 3); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.cons/dtor.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.cons/dtor.pass.cpp deleted file mode 100644 index e6f334808c1..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.cons/dtor.pass.cpp +++ /dev/null @@ -1,86 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ~ios_base() - -#include -#include -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -bool f1_called = false; -bool f2_called = false; -bool f3_called = false; - -void f1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::erase_event) - { - assert(!f1_called); - assert( f2_called); - assert( f3_called); - assert(stream.getloc().name() == "C"); - assert(index == 4); - f1_called = true; - } -} - -void f2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::erase_event) - { - assert(!f1_called); - assert(!f2_called); - assert( f3_called); - assert(stream.getloc().name() == "C"); - assert(index == 5); - f2_called = true; - } -} - -void f3(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::erase_event) - { - assert(!f1_called); - assert(!f2_called); - assert(!f3_called); - assert(stream.getloc().name() == "C"); - assert(index == 6); - f3_called = true; - } -} - -int main() -{ - { - test t; - std::ios_base& b = t; - b.register_callback(f1, 4); - b.register_callback(f2, 5); - b.register_callback(f3, 6); - } - assert(f1_called); - assert(f2_called); - assert(f3_called); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp deleted file mode 100644 index 8f265bc6988..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// locale getloc() const; - -#include -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - const test t; - assert(t.getloc().name() == std::string("C")); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp deleted file mode 100644 index 4e34c08ab08..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp +++ /dev/null @@ -1,89 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// locale imbue(const locale& loc); - -#include -#include -#include -#include - -#include "platform_support.h" // locale name macros - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -bool f1_called = false; -bool f2_called = false; -bool f3_called = false; - -void f1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(!f1_called); - assert( f2_called); - assert( f3_called); - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 4); - f1_called = true; - } -} - -void f2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(!f1_called); - assert(!f2_called); - assert( f3_called); - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 5); - f2_called = true; - } -} - -void f3(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(!f1_called); - assert(!f2_called); - assert(!f3_called); - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 6); - f3_called = true; - } -} - -int main() -{ - test t; - std::ios_base& b = t; - b.register_callback(f1, 4); - b.register_callback(f2, 5); - b.register_callback(f3, 6); - std::locale l = b.imbue(std::locale(LOCALE_en_US_UTF_8)); - assert(l.name() == std::string("C")); - assert(b.getloc().name() == std::string(LOCALE_en_US_UTF_8)); - assert(f1_called); - assert(f2_called); - assert(f3_called); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp deleted file mode 100644 index 1e2ee50632a..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// long& iword(int idx); - -#include -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - test t; - std::ios_base& b = t; - for (int i = 0; i < 10000; ++i) - { - assert(b.iword(i) == 0); - b.iword(i) = i; - assert(b.iword(i) == i); - for (int j = 0; j <= i; ++j) - assert(b.iword(j) == j); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp deleted file mode 100644 index 5246ad8f644..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// void*& pword(int idx); - -#include -#include -#include -#include - -class test - : public std::ios -{ -public: - test() - { - init(0); - } -}; - -int main() -{ - test t; - std::ios_base& b = t; - for (std::intptr_t i = 0; i < 10000; ++i) - { - assert(b.pword(i) == 0); - b.pword(i) = (void*)i; - assert(b.pword(i) == (void*)i); - for (std::intptr_t j = 0; j <= i; ++j) - assert(b.pword(j) == (void*)j); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp deleted file mode 100644 index eb737b1a7dc..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// static int xalloc(); - -#include -#include - -int main() -{ - assert(std::ios_base::xalloc() == 0); - assert(std::ios_base::xalloc() == 1); - assert(std::ios_base::xalloc() == 2); - assert(std::ios_base::xalloc() == 3); - assert(std::ios_base::xalloc() == 4); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.members.static/sync_with_stdio.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.members.static/sync_with_stdio.pass.cpp deleted file mode 100644 index 5dc72b1edc0..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.members.static/sync_with_stdio.pass.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// bool sync_with_stdio(bool sync = true); - -#include -#include - -int main() -{ - assert( std::ios_base::sync_with_stdio(false)); - assert(!std::ios_base::sync_with_stdio(false)); - assert(!std::ios_base::sync_with_stdio(true)); - assert( std::ios_base::sync_with_stdio(true)); - assert( std::ios_base::sync_with_stdio()); - assert( std::ios_base::sync_with_stdio(false)); - assert(!std::ios_base::sync_with_stdio()); - assert( std::ios_base::sync_with_stdio()); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_Init/tested_elsewhere.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_Init/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_Init/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp deleted file mode 100644 index 50f5fdad744..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base::failure - -// explicit failure(const char* msg, const error_code& ec = io_errc::stream); - -#include -#include -#include - -int main() -{ - { - std::string what_arg("io test message"); - std::ios_base::failure se(what_arg.c_str(), make_error_code(std::errc::is_a_directory)); - assert(se.code() == std::make_error_code(std::errc::is_a_directory)); - std::string what_message(se.what()); - assert(what_message.find(what_arg) != std::string::npos); - assert(what_message.find("Is a directory") != std::string::npos); - } - { - std::string what_arg("io test message"); - std::ios_base::failure se(what_arg.c_str()); - assert(se.code() == std::make_error_code(std::io_errc::stream)); - std::string what_message(se.what()); - assert(what_message.find(what_arg) != std::string::npos); - assert(what_message.find(std::iostream_category().message(static_cast - (std::io_errc::stream))) != std::string::npos); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp deleted file mode 100644 index 5c9abbe5379..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base::failure - -// explicit failure(const string& msg, const error_code& ec = io_errc::stream); - -#include -#include -#include - -int main() -{ - { - std::string what_arg("io test message"); - std::ios_base::failure se(what_arg, make_error_code(std::errc::is_a_directory)); - assert(se.code() == std::make_error_code(std::errc::is_a_directory)); - std::string what_message(se.what()); - assert(what_message.find(what_arg) != std::string::npos); - assert(what_message.find("Is a directory") != std::string::npos); - } - { - std::string what_arg("io test message"); - std::ios_base::failure se(what_arg); - assert(se.code() == std::make_error_code(std::io_errc::stream)); - std::string what_message(se.what()); - assert(what_message.find(what_arg) != std::string::npos); - assert(what_message.find(std::iostream_category().message(static_cast - (std::io_errc::stream))) != std::string::npos); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_fmtflags/fmtflags.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_fmtflags/fmtflags.pass.cpp deleted file mode 100644 index 9f374598ff7..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_fmtflags/fmtflags.pass.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// static const fmtflags boolalpha; -// static const fmtflags dec; -// static const fmtflags fixed; -// static const fmtflags hex; -// static const fmtflags internal; -// static const fmtflags left; -// static const fmtflags oct; -// static const fmtflags right; -// static const fmtflags scientific; -// static const fmtflags showbase; -// static const fmtflags showpoint; -// static const fmtflags showpos; -// static const fmtflags skipws; -// static const fmtflags unitbuf; -// static const fmtflags uppercase; -// static const fmtflags adjustfield = left | right | internal; -// static const fmtflags basefield = dec | oct | hex; -// static const fmtflags floatfield = scientific | fixed; - -#include -#include - -int main() -{ - assert(std::ios_base::boolalpha); - assert(std::ios_base::dec); - assert(std::ios_base::fixed); - assert(std::ios_base::hex); - assert(std::ios_base::internal); - assert(std::ios_base::left); - assert(std::ios_base::oct); - assert(std::ios_base::right); - assert(std::ios_base::scientific); - assert(std::ios_base::showbase); - assert(std::ios_base::showpoint); - assert(std::ios_base::showpos); - assert(std::ios_base::skipws); - assert(std::ios_base::unitbuf); - assert(std::ios_base::uppercase); - - assert - ( - ( std::ios_base::boolalpha - & std::ios_base::dec - & std::ios_base::fixed - & std::ios_base::hex - & std::ios_base::internal - & std::ios_base::left - & std::ios_base::oct - & std::ios_base::right - & std::ios_base::scientific - & std::ios_base::showbase - & std::ios_base::showpoint - & std::ios_base::showpos - & std::ios_base::skipws - & std::ios_base::unitbuf - & std::ios_base::uppercase) == 0 - ); - - assert(std::ios_base::adjustfield == (std::ios_base::left - | std::ios_base::right - | std::ios_base::internal)); - assert(std::ios_base::basefield == (std::ios_base::dec - | std::ios_base::oct - | std::ios_base::hex)); - assert(std::ios_base::floatfield == (std::ios_base::scientific - | std::ios_base::fixed)); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp deleted file mode 100644 index 55c02f38ce9..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// static const iostate badbit; -// static const iostate eofbit; -// static const iostate failbit; -// static const iostate goodbit = 0; - -#include -#include - -int main() -{ - assert(std::ios_base::badbit); - assert(std::ios_base::eofbit); - assert(std::ios_base::failbit); - - assert - ( - ( std::ios_base::badbit - & std::ios_base::eofbit - & std::ios_base::failbit) == 0 - ); - - assert(std::ios_base::goodbit == 0); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_openmode/openmode.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_openmode/openmode.pass.cpp deleted file mode 100644 index 238593feb30..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_openmode/openmode.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// static const openmode app; -// static const openmode ate; -// static const openmode binary; -// static const openmode in; -// static const openmode out; -// static const openmode trunc; - -#include -#include - -int main() -{ - assert(std::ios_base::app); - assert(std::ios_base::ate); - assert(std::ios_base::binary); - assert(std::ios_base::in); - assert(std::ios_base::out); - assert(std::ios_base::trunc); - - assert - ( - ( std::ios_base::app - & std::ios_base::ate - & std::ios_base::binary - & std::ios_base::in - & std::ios_base::out - & std::ios_base::trunc) == 0 - ); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_seekdir/seekdir.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_seekdir/seekdir.pass.cpp deleted file mode 100644 index 005fb61cc31..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/ios_seekdir/seekdir.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// static const seekdir beg; -// static const seekdir cur; -// static const seekdir end; - -#include -#include - -int main() -{ - assert(std::ios_base::beg != std::ios_base::cur); - assert(std::ios_base::beg != std::ios_base::end); - assert(std::ios_base::cur != std::ios_base::end); -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.types/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/ios.types/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.base/ios.base/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/nothing_to_do.pass.cpp deleted file mode 100644 index 760bfcb26d2..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios.base/nothing_to_do.pass.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp deleted file mode 100644 index d86059ea6f7..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// explicit basic_ios(basic_streambuf* sb); - -#include -#include -#include - -int main() -{ - { - std::streambuf* sb = 0; - std::basic_ios ios(sb); - assert(ios.rdbuf() == sb); - assert(ios.tie() == 0); - assert(ios.rdstate() == std::ios::badbit); - assert(ios.exceptions() == std::ios::goodbit); - assert(ios.flags() == (std::ios::skipws | std::ios::dec)); - assert(ios.width() == 0); - assert(ios.precision() == 6); - assert(ios.fill() == ' '); - assert(ios.getloc() == std::locale()); - } - { - std::streambuf* sb = (std::streambuf*)1; - std::basic_ios ios(sb); - assert(ios.rdbuf() == sb); - assert(ios.tie() == 0); - assert(ios.rdstate() == std::ios::goodbit); - assert(ios.exceptions() == std::ios::goodbit); - assert(ios.flags() == (std::ios::skipws | std::ios::dec)); - assert(ios.width() == 0); - assert(ios.precision() == 6); - assert(ios.fill() == ' '); - assert(ios.getloc() == std::locale()); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp deleted file mode 100644 index c46e2c054e8..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp +++ /dev/null @@ -1,190 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// REQUIRES: locale.en_US.UTF-8 -// REQUIRES: locale.fr_FR.UTF-8 - -// - -// template class basic_ios - -// basic_ios& copyfmt(const basic_ios& rhs); - -#include -#include -#include - -#include "platform_support.h" // locale name macros - -struct testbuf - : public std::streambuf -{ -}; - -bool f1_called = false; -bool f2_called = false; - -bool g1_called = false; -bool g2_called = false; -bool g3_called = false; - -void f1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::erase_event) - { - assert(!f1_called); - assert( f2_called); - assert(!g1_called); - assert(!g2_called); - assert(!g3_called); - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 4); - f1_called = true; - } -} - -void f2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::erase_event) - { - assert(!f1_called); - assert(!f2_called); - assert(!g1_called); - assert(!g2_called); - assert(!g3_called); - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 5); - f2_called = true; - } -} - -void g1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::copyfmt_event) - { - assert( f1_called); - assert( f2_called); - assert(!g1_called); - assert( g2_called); - assert( g3_called); - assert(stream.getloc().name() == LOCALE_fr_FR_UTF_8); - assert(index == 7); - g1_called = true; - } -} - -void g2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::copyfmt_event) - { - assert( f1_called); - assert( f2_called); - assert(!g1_called); - assert(!g2_called); - assert( g3_called); - assert(stream.getloc().name() == LOCALE_fr_FR_UTF_8); - assert(index == 8); - g2_called = true; - } -} - -void g3(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::copyfmt_event) - { - assert( f1_called); - assert( f2_called); - assert(!g1_called); - assert(!g2_called); - assert(!g3_called); - assert(stream.getloc().name() == LOCALE_fr_FR_UTF_8); - assert(index == 9); - g3_called = true; - } -} - -int main() -{ - testbuf sb1; - std::ios ios1(&sb1); - ios1.flags(std::ios::boolalpha | std::ios::dec | std::ios::fixed); - ios1.precision(1); - ios1.width(11); - ios1.imbue(std::locale(LOCALE_en_US_UTF_8)); - ios1.exceptions(std::ios::failbit); - ios1.setstate(std::ios::eofbit); - ios1.register_callback(f1, 4); - ios1.register_callback(f2, 5); - ios1.iword(0) = 1; - ios1.iword(1) = 2; - ios1.iword(2) = 3; - char c1, c2, c3; - ios1.pword(0) = &c1; - ios1.pword(1) = &c2; - ios1.pword(2) = &c3; - ios1.tie((std::ostream*)1); - ios1.fill('1'); - - testbuf sb2; - std::ios ios2(&sb2); - ios2.flags(std::ios::showpoint | std::ios::uppercase); - ios2.precision(2); - ios2.width(12); - ios2.imbue(std::locale(LOCALE_fr_FR_UTF_8)); - ios2.exceptions(std::ios::eofbit); - ios2.setstate(std::ios::goodbit); - ios2.register_callback(g1, 7); - ios2.register_callback(g2, 8); - ios2.register_callback(g3, 9); - ios2.iword(0) = 4; - ios2.iword(1) = 5; - ios2.iword(2) = 6; - ios2.iword(3) = 7; - ios2.iword(4) = 8; - ios2.iword(5) = 9; - char d1, d2; - ios2.pword(0) = &d1; - ios2.pword(1) = &d2; - ios2.tie((std::ostream*)2); - ios2.fill('2'); - - ios1.copyfmt(ios1); - assert(!f1_called); - - try - { - ios1.copyfmt(ios2); - assert(false); - } - catch (std::ios_base::failure&) - { - } - assert(ios1.rdstate() == std::ios::eofbit); - assert(ios1.rdbuf() == &sb1); - assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase)); - assert(ios1.precision() == 2); - assert(ios1.width() == 12); - assert(ios1.getloc().name() == LOCALE_fr_FR_UTF_8); - assert(ios1.exceptions() == std::ios::eofbit); - assert(f1_called); - assert(f2_called); - assert(g1_called); - assert(g2_called); - assert(g3_called); - assert(ios1.iword(0) == 4); - assert(ios1.iword(1) == 5); - assert(ios1.iword(2) == 6); - assert(ios1.iword(3) == 7); - assert(ios1.iword(4) == 8); - assert(ios1.iword(5) == 9); - assert(ios1.pword(0) == &d1); - assert(ios1.pword(1) == &d2); - assert(ios1.tie() == (std::ostream*)2); - assert(ios1.fill() == '2'); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp deleted file mode 100644 index f5c5aa22b65..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// char_type fill() const; - -#include -#include - -int main() -{ - const std::ios ios(0); - assert(ios.fill() == ' '); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp deleted file mode 100644 index 10dccca8583..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// char_type fill(char_type fillch); - -#include -#include - -int main() -{ - std::ios ios(0); - assert(ios.fill() == ' '); - char c = ios.fill('*'); - assert(c == ' '); - assert(ios.fill() == '*'); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp deleted file mode 100644 index 6d4ce5f577f..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp +++ /dev/null @@ -1,101 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// locale imbue(const locale& loc); - -#include -#include -#include - -#include "platform_support.h" // locale name macros - -struct testbuf - : public std::streambuf -{ -}; - -bool f1_called = false; -bool f2_called = false; -bool f3_called = false; - -void f1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(!f1_called); - assert( f2_called); - assert( f3_called); - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 4); - f1_called = true; - } -} - -void f2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(!f1_called); - assert(!f2_called); - assert( f3_called); - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 5); - f2_called = true; - } -} - -void f3(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(!f1_called); - assert(!f2_called); - assert(!f3_called); - assert(stream.getloc().name() == LOCALE_en_US_UTF_8); - assert(index == 6); - f3_called = true; - } -} - -int main() -{ - { - std::ios ios(0); - ios.register_callback(f1, 4); - ios.register_callback(f2, 5); - ios.register_callback(f3, 6); - std::locale l = ios.imbue(std::locale(LOCALE_en_US_UTF_8)); - assert(l.name() == std::string("C")); - assert(ios.getloc().name() == std::string(LOCALE_en_US_UTF_8)); - assert(f1_called); - assert(f2_called); - assert(f3_called); - } - f1_called = false; - f2_called = false; - f3_called = false; - { - testbuf sb; - std::ios ios(&sb); - ios.register_callback(f1, 4); - ios.register_callback(f2, 5); - ios.register_callback(f3, 6); - std::locale l = ios.imbue(std::locale(LOCALE_en_US_UTF_8)); - assert(l.name() == std::string("C")); - assert(ios.getloc().name() == std::string(LOCALE_en_US_UTF_8)); - assert(sb.getloc().name() == std::string(LOCALE_en_US_UTF_8)); - assert(f1_called); - assert(f2_called); - assert(f3_called); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp deleted file mode 100644 index 509b836686c..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp +++ /dev/null @@ -1,140 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// REQUIRES: locale.fr_FR.UTF-8 - -// - -// template class basic_ios - -// void move(basic_ios&& rhs); - -#include -#include -#include - -#include "platform_support.h" // locale name macros - -struct testbuf - : public std::streambuf -{ -}; - -struct testios - : public std::ios -{ - testios() {} - testios(std::streambuf* p) : std::ios(p) {} - void move(std::ios& x) {std::ios::move(x);} -}; - -bool f1_called = false; -bool f2_called = false; - -bool g1_called = false; -bool g2_called = false; -bool g3_called = false; - -void f1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - f1_called = true; -} - -void f2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - f2_called = true; -} - -void g1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(index == 7); - g1_called = true; - } -} - -void g2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(index == 8); - g2_called = true; - } -} - -void g3(std::ios_base::event ev, std::ios_base& stream, int index) -{ - if (ev == std::ios_base::imbue_event) - { - assert(index == 9); - g3_called = true; - } -} - -int main() -{ - testios ios1; - testbuf sb2; - std::ios ios2(&sb2); - ios2.flags(std::ios::showpoint | std::ios::uppercase); - ios2.precision(2); - ios2.width(12); - ios2.imbue(std::locale(LOCALE_fr_FR_UTF_8)); - ios2.exceptions(std::ios::eofbit); - ios2.setstate(std::ios::goodbit); - ios2.register_callback(g1, 7); - ios2.register_callback(g2, 8); - ios2.register_callback(g3, 9); - ios2.iword(0) = 4; - ios2.iword(1) = 5; - ios2.iword(2) = 6; - ios2.iword(3) = 7; - ios2.iword(4) = 8; - ios2.iword(5) = 9; - char d1, d2; - ios2.pword(0) = &d1; - ios2.pword(1) = &d2; - ios2.tie((std::ostream*)2); - ios2.fill('2'); - - ios1.move(ios2); - - assert(ios1.rdstate() == std::ios::goodbit); - assert(ios1.rdbuf() == 0); - assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase)); - assert(ios1.precision() == 2); - assert(ios1.width() == 12); - assert(ios1.getloc().name() == LOCALE_fr_FR_UTF_8); - assert(ios1.exceptions() == std::ios::eofbit); - assert(!f1_called); - assert(!f2_called); - assert(!g1_called); - assert(!g2_called); - assert(!g3_called); - assert(ios1.iword(0) == 4); - assert(ios1.iword(1) == 5); - assert(ios1.iword(2) == 6); - assert(ios1.iword(3) == 7); - assert(ios1.iword(4) == 8); - assert(ios1.iword(5) == 9); - assert(ios1.pword(0) == &d1); - assert(ios1.pword(1) == &d2); - assert(ios1.tie() == (std::ostream*)2); - assert(ios1.fill() == '2'); - ios1.imbue(std::locale("C")); - assert(!f1_called); - assert(!f2_called); - assert(g1_called); - assert(g2_called); - assert(g3_called); - - assert(ios2.rdbuf() == &sb2); - assert(ios2.tie() == 0); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/narow.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/narow.pass.cpp deleted file mode 100644 index bf865e68149..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/narow.pass.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// char narrow(char_type c, char dfault) const; - -#include -#include - -int main() -{ - const std::ios ios(0); - assert(ios.narrow('c', '*') == 'c'); - assert(ios.narrow('\xFE', '*') == '*'); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp deleted file mode 100644 index 7be92e72b86..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// basic_streambuf* rdbuf() const; - -#include -#include -#include - -int main() -{ - { - const std::ios ios(0); - assert(ios.rdbuf() == 0); - } - { - std::streambuf* sb = (std::streambuf*)1; - const std::ios ios(sb); - assert(ios.rdbuf() == sb); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp deleted file mode 100644 index cc0b3f3f169..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// basic_streambuf* rdbuf(basic_streambuf* sb); - -#include -#include -#include - -int main() -{ - std::ios ios(0); - assert(ios.rdbuf() == 0); - assert(!ios.good()); - std::streambuf* sb = (std::streambuf*)1; - std::streambuf* sb2 = ios.rdbuf(sb); - assert(sb2 == 0); - assert(ios.rdbuf() == sb); - assert(ios.good()); - sb2 = ios.rdbuf(0); - assert(sb2 == (std::streambuf*)1); - assert(ios.rdbuf() == 0); - assert(ios.bad()); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp deleted file mode 100644 index 2d4beee37ec..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// void set_rdbuf(basic_streambuf* sb); - -#include -#include -#include - -struct testbuf - : public std::streambuf -{ -}; - -struct testios - : public std::ios -{ - testios(std::streambuf* p) : std::ios(p) {} - void set_rdbuf(std::streambuf* x) {std::ios::set_rdbuf(x);} -}; - -int main() -{ - testbuf sb1; - testbuf sb2; - testios ios(&sb1); - try - { - ios.setstate(std::ios::badbit); - ios.exceptions(std::ios::badbit); - } - catch (...) - { - } - ios.set_rdbuf(&sb2); - assert(ios.rdbuf() == &sb2); - try - { - ios.setstate(std::ios::badbit); - ios.exceptions(std::ios::badbit); - } - catch (...) - { - } - ios.set_rdbuf(0); - assert(ios.rdbuf() == 0); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp deleted file mode 100644 index e44f4b32512..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp +++ /dev/null @@ -1,168 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// REQUIRES: locale.en_US.UTF-8 -// REQUIRES: locale.fr_FR.UTF-8 - -// - -// template class basic_ios - -// void move(basic_ios&& rhs); - -#include -#include -#include - -#include "platform_support.h" // locale name macros - -struct testbuf - : public std::streambuf -{ -}; - -struct testios - : public std::ios -{ - testios(std::streambuf* p) : std::ios(p) {} - void swap(std::ios& x) {std::ios::swap(x);} -}; - -bool f1_called = false; -bool f2_called = false; - -bool g1_called = false; -bool g2_called = false; -bool g3_called = false; - -void f1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - assert(index == 4); - f1_called = true; -} - -void f2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - assert(index == 5); - f2_called = true; -} - -void g1(std::ios_base::event ev, std::ios_base& stream, int index) -{ - assert(index == 7); - g1_called = true; -} - -void g2(std::ios_base::event ev, std::ios_base& stream, int index) -{ - assert(index == 8); - g2_called = true; -} - -void g3(std::ios_base::event ev, std::ios_base& stream, int index) -{ - assert(index == 9); - g3_called = true; -} - -int main() -{ - testbuf sb1; - testios ios1(&sb1); - ios1.flags(std::ios::boolalpha | std::ios::dec | std::ios::fixed); - ios1.precision(1); - ios1.width(11); - ios1.imbue(std::locale(LOCALE_en_US_UTF_8)); - ios1.exceptions(std::ios::failbit); - ios1.setstate(std::ios::eofbit); - ios1.register_callback(f1, 4); - ios1.register_callback(f2, 5); - ios1.iword(0) = 1; - ios1.iword(1) = 2; - ios1.iword(2) = 3; - char c1, c2, c3; - ios1.pword(0) = &c1; - ios1.pword(1) = &c2; - ios1.pword(2) = &c3; - ios1.tie((std::ostream*)1); - ios1.fill('1'); - - testbuf sb2; - testios ios2(&sb2); - ios2.flags(std::ios::showpoint | std::ios::uppercase); - ios2.precision(2); - ios2.width(12); - ios2.imbue(std::locale(LOCALE_fr_FR_UTF_8)); - ios2.exceptions(std::ios::eofbit); - ios2.setstate(std::ios::goodbit); - ios2.register_callback(g1, 7); - ios2.register_callback(g2, 8); - ios2.register_callback(g3, 9); - ios2.iword(0) = 4; - ios2.iword(1) = 5; - ios2.iword(2) = 6; - ios2.iword(3) = 7; - ios2.iword(4) = 8; - ios2.iword(5) = 9; - char d1, d2; - ios2.pword(0) = &d1; - ios2.pword(1) = &d2; - ios2.tie((std::ostream*)2); - ios2.fill('2'); - - ios1.swap(ios2); - - assert(ios1.rdstate() == std::ios::goodbit); - assert(ios1.rdbuf() == &sb1); - assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase)); - assert(ios1.precision() == 2); - assert(ios1.width() == 12); - assert(ios1.getloc().name() == LOCALE_fr_FR_UTF_8); - assert(ios1.exceptions() == std::ios::eofbit); - assert(!f1_called); - assert(!f2_called); - assert(!g1_called); - assert(!g2_called); - assert(!g3_called); - assert(ios1.iword(0) == 4); - assert(ios1.iword(1) == 5); - assert(ios1.iword(2) == 6); - assert(ios1.iword(3) == 7); - assert(ios1.iword(4) == 8); - assert(ios1.iword(5) == 9); - assert(ios1.pword(0) == &d1); - assert(ios1.pword(1) == &d2); - assert(ios1.tie() == (std::ostream*)2); - assert(ios1.fill() == '2'); - ios1.imbue(std::locale("C")); - assert(!f1_called); - assert(!f2_called); - assert(g1_called); - assert(g2_called); - assert(g3_called); - - assert(ios2.rdstate() == std::ios::eofbit); - assert(ios2.rdbuf() == &sb2); - assert(ios2.flags() == (std::ios::boolalpha | std::ios::dec | std::ios::fixed)); - assert(ios2.precision() == 1); - assert(ios2.width() == 11); - assert(ios2.getloc().name() == LOCALE_en_US_UTF_8); - assert(ios2.exceptions() == std::ios::failbit); - assert(ios2.iword(0) == 1); - assert(ios2.iword(1) == 2); - assert(ios2.iword(2) == 3); - assert(ios2.pword(0) == &c1); - assert(ios2.pword(1) == &c2); - assert(ios2.pword(2) == &c3); - assert(ios2.tie() == (std::ostream*)1); - assert(ios2.fill() == '1'); - ios2.imbue(std::locale("C")); - assert(f1_called); - assert(f2_called); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp deleted file mode 100644 index 71eb238469c..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// basic_ostream* tie() const; - -#include -#include - -int main() -{ - const std::basic_ios ios(0); - assert(ios.tie() == 0); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp deleted file mode 100644 index acccbea2aa0..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// basic_ostream* tie(basic_ostream* tiestr); - -#include -#include - -int main() -{ - std::ios ios(0); - std::ostream* os = (std::ostream*)1; - std::ostream* r = ios.tie(os); - assert(r == 0); - assert(ios.tie() == os); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp deleted file mode 100644 index 68fdf685989..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// char_type widen(char c) const; - -#include -#include - -int main() -{ - const std::ios ios(0); - assert(ios.widen('c') == 'c'); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp deleted file mode 100644 index 1005df6ef25..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// bool bad() const; - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - { - std::ios ios(0); - assert(ios.bad()); - ios.setstate(std::ios::eofbit); - assert(ios.bad()); - } - { - testbuf sb; - std::ios ios(&sb); - assert(!ios.bad()); - ios.setstate(std::ios::eofbit); - assert(!ios.bad()); - ios.setstate(std::ios::failbit); - assert(!ios.bad()); - ios.setstate(std::ios::badbit); - assert(ios.bad()); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp deleted file mode 100644 index 0de889e549c..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// operator unspecified-bool-type() const; - -#include -#include - -int main() -{ - std::ios ios(0); - assert(static_cast(ios) == !ios.fail()); - ios.setstate(std::ios::failbit); - assert(static_cast(ios) == !ios.fail()); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp deleted file mode 100644 index 0c2e8f0860c..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp +++ /dev/null @@ -1,65 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// void clear(iostate state = goodbit); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - { - std::ios ios(0); - ios.clear(); - assert(ios.rdstate() == std::ios::badbit); - try - { - ios.exceptions(std::ios::badbit); - } - catch (...) - { - } - try - { - ios.clear(); - assert(false); - } - catch (std::ios::failure&) - { - assert(ios.rdstate() == std::ios::badbit); - } - try - { - ios.clear(std::ios::eofbit); - assert(false); - } - catch (std::ios::failure&) - { - assert(ios.rdstate() == (std::ios::eofbit | std::ios::badbit)); - } - } - { - testbuf sb; - std::ios ios(&sb); - ios.clear(); - assert(ios.rdstate() == std::ios::goodbit); - ios.exceptions(std::ios::badbit); - ios.clear(); - assert(ios.rdstate() == std::ios::goodbit); - ios.clear(std::ios::eofbit); - assert(ios.rdstate() == std::ios::eofbit); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp deleted file mode 100644 index 64d5a3018d1..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// bool eof() const; - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - { - std::ios ios(0); - assert(!ios.eof()); - ios.setstate(std::ios::eofbit); - assert(ios.eof()); - } - { - testbuf sb; - std::ios ios(&sb); - assert(!ios.eof()); - ios.setstate(std::ios::eofbit); - assert(ios.eof()); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp deleted file mode 100644 index d5158a18468..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// iostate exceptions() const; - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - { - const std::ios ios(0); - assert(ios.exceptions() == std::ios::goodbit); - } - { - testbuf sb; - const std::ios ios(&sb); - assert(ios.exceptions() == std::ios::goodbit); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp deleted file mode 100644 index a0013eabdac..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// iostate exceptions() const; - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - { - std::ios ios(0); - assert(ios.exceptions() == std::ios::goodbit); - ios.exceptions(std::ios::eofbit); - assert(ios.exceptions() == std::ios::eofbit); - try - { - ios.exceptions(std::ios::badbit); - assert(false); - } - catch (std::ios::failure&) - { - } - assert(ios.exceptions() == std::ios::badbit); - } - { - testbuf sb; - std::ios ios(&sb); - assert(ios.exceptions() == std::ios::goodbit); - ios.exceptions(std::ios::eofbit); - assert(ios.exceptions() == std::ios::eofbit); - ios.exceptions(std::ios::badbit); - assert(ios.exceptions() == std::ios::badbit); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp deleted file mode 100644 index fa9f765bfd5..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// bool fail() const; - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - { - std::ios ios(0); - assert(ios.fail()); - ios.setstate(std::ios::eofbit); - assert(ios.fail()); - } - { - testbuf sb; - std::ios ios(&sb); - assert(!ios.fail()); - ios.setstate(std::ios::eofbit); - assert(!ios.fail()); - ios.setstate(std::ios::badbit); - assert(ios.fail()); - ios.setstate(std::ios::failbit); - assert(ios.fail()); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp deleted file mode 100644 index 03f89506d6f..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// bool good() const; - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - { - std::ios ios(0); - assert(!ios.good()); - } - { - testbuf sb; - std::ios ios(&sb); - assert(ios.good()); - ios.setstate(std::ios::eofbit); - assert(!ios.good()); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp deleted file mode 100644 index ef534f6d0ad..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// bool operator!() const; - -#include -#include - -int main() -{ - std::ios ios(0); - assert(!ios == ios.fail()); - ios.setstate(std::ios::failbit); - assert(!ios == ios.fail()); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp deleted file mode 100644 index d09e2a62ee3..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// iostate rdstate() const; - -#include -#include - -int main() -{ - std::ios ios(0); - assert(ios.rdstate() == std::ios::badbit); - ios.setstate(std::ios::failbit); - assert(ios.rdstate() == (std::ios::failbit | std::ios::badbit)); -} diff --git a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp deleted file mode 100644 index b3c66c487e9..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp +++ /dev/null @@ -1,64 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class basic_ios - -// void setstate(iostate state); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - { - std::ios ios(0); - ios.setstate(std::ios::goodbit); - assert(ios.rdstate() == std::ios::badbit); - try - { - ios.exceptions(std::ios::badbit); - } - catch (...) - { - } - try - { - ios.setstate(std::ios::goodbit); - assert(false); - } - catch (std::ios::failure&) - { - assert(ios.rdstate() == std::ios::badbit); - } - try - { - ios.setstate(std::ios::eofbit); - assert(false); - } - catch (std::ios::failure&) - { - assert(ios.rdstate() == (std::ios::eofbit | std::ios::badbit)); - } - } - { - testbuf sb; - std::ios ios(&sb); - ios.setstate(std::ios::goodbit); - assert(ios.rdstate() == std::ios::goodbit); - ios.setstate(std::ios::eofbit); - assert(ios.rdstate() == std::ios::eofbit); - ios.setstate(std::ios::failbit); - assert(ios.rdstate() == (std::ios::eofbit | std::ios::failbit)); - } -} diff --git a/libcxx/test/input.output/iostreams.base/ios/types.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/types.pass.cpp deleted file mode 100644 index 22e33f61f42..00000000000 --- a/libcxx/test/input.output/iostreams.base/ios/types.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_ios : public ios_base -// { -// public: -// typedef charT char_type; -// typedef typename traits::int_type int_type; -// typedef typename traits::pos_type pos_type; -// typedef typename traits::off_type off_type; -// typedef traits traits_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp deleted file mode 100644 index 461c7774248..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& internal(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::internal(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::internal); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp deleted file mode 100644 index aa2ca6f27ef..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& left(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::left(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::left); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp deleted file mode 100644 index 08056e8f353..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& right(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::right(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::right); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp deleted file mode 100644 index cbe03bceb2b..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& dec(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::dec(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::dec); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp deleted file mode 100644 index 281a59cdafd..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& hex(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::hex(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::hex); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp deleted file mode 100644 index 5ebfea86f4f..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& oct(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::oct(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::oct); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp deleted file mode 100644 index a93c7b4c2fe..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// const error_category& iostream_category(); - -#include -#include -#include - -int main() -{ - const std::error_category& e_cat1 = std::iostream_category(); - std::string m1 = e_cat1.name(); - assert(m1 == "iostream"); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp deleted file mode 100644 index f764fa6fd79..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// error_code make_error_code(io_errc e); - -#include -#include - -int main() -{ - { - std::error_code ec = make_error_code(std::io_errc::stream); - assert(ec.value() == static_cast(std::io_errc::stream)); - assert(ec.category() == std::iostream_category()); - } -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp deleted file mode 100644 index 30931bae0bd..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// error_condition make_error_condition(io_errc e); - -#include -#include - -int main() -{ - { - const std::error_condition ec1 = std::make_error_condition(std::io_errc::stream); - assert(ec1.value() == static_cast(std::io_errc::stream)); - assert(ec1.category() == std::iostream_category()); - } -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp deleted file mode 100644 index f202bc4c881..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& defaultfloat(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::defaultfloat(ios); - assert(&r == &ios); - assert(!(ios.flags() & std::ios::fixed)); - assert(!(ios.flags() & std::ios::scientific)); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp deleted file mode 100644 index 55bf2648f3e..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& fixed(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::fixed(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::fixed); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp deleted file mode 100644 index 2920cca83d0..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& hexfloat(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::hexfloat(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::fixed); - assert(ios.flags() & std::ios::scientific); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp deleted file mode 100644 index 53cfd8171f3..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& scientific(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::scientific(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::scientific); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp deleted file mode 100644 index ca8cd93f05b..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& boolalpha(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::boolalpha(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::boolalpha); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp deleted file mode 100644 index ebc0aab67db..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& noboolalpha(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::boolalpha(ios); - std::ios_base& r = std::noboolalpha(ios); - assert(&r == &ios); - assert(!(ios.flags() & std::ios::boolalpha)); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp deleted file mode 100644 index 91608f0f503..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& noshowbase(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::showbase(ios); - std::ios_base& r = std::noshowbase(ios); - assert(&r == &ios); - assert(!(ios.flags() & std::ios::showbase)); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp deleted file mode 100644 index 6e26416c5cd..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& noshowpoint(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::showpoint(ios); - std::ios_base& r = std::noshowpoint(ios); - assert(&r == &ios); - assert(!(ios.flags() & std::ios::showpoint)); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp deleted file mode 100644 index 5e6911c22b9..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& noshowpos(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::showpos(ios); - std::ios_base& r = std::noshowpos(ios); - assert(&r == &ios); - assert(!(ios.flags() & std::ios::showpos)); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp deleted file mode 100644 index e78f5f884cc..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& noskipws(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::skipws(ios); - std::ios_base& r = std::noskipws(ios); - assert(&r == &ios); - assert(!(ios.flags() & std::ios::skipws)); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp deleted file mode 100644 index 5708038e5ed..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& nounitbuf(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::unitbuf(ios); - std::ios_base& r = std::nounitbuf(ios); - assert(&r == &ios); - assert(!(ios.flags() & std::ios::unitbuf)); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp deleted file mode 100644 index 76fac604b34..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& nouppercase(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::uppercase(ios); - std::ios_base& r = std::nouppercase(ios); - assert(&r == &ios); - assert(!(ios.flags() & std::ios::uppercase)); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp deleted file mode 100644 index ddf3a855096..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& showbase(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::showbase(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::showbase); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp deleted file mode 100644 index 79ae3b6e27a..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& showpoint(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::showpoint(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::showpoint); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp deleted file mode 100644 index 226542614c1..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& showpos(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::showpos(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::showpos); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp deleted file mode 100644 index 4ea3e448fe0..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& skipws(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::skipws(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::skipws); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp deleted file mode 100644 index 99a33c71c89..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& unitbuf(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::unitbuf(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::unitbuf); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp deleted file mode 100644 index 1a19e2aa636..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ios_base - -// ios_base& uppercase(ios_base& str); - -#include -#include -#include - -struct testbuf : public std::streambuf {}; - -int main() -{ - testbuf sb; - std::ios ios(&sb); - std::ios_base& r = std::uppercase(ios); - assert(&r == &ios); - assert(ios.flags() & std::ios::uppercase); -} diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.base/stream.types/streamoff.pass.cpp b/libcxx/test/input.output/iostreams.base/stream.types/streamoff.pass.cpp deleted file mode 100644 index 0e9f1278ee0..00000000000 --- a/libcxx/test/input.output/iostreams.base/stream.types/streamoff.pass.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// typedef OFF_T streamoff; - -#include -#include - -int main() -{ - static_assert(std::is_integral::value, ""); - static_assert(std::is_signed::value, ""); -} diff --git a/libcxx/test/input.output/iostreams.base/stream.types/streamsize.pass.cpp b/libcxx/test/input.output/iostreams.base/stream.types/streamsize.pass.cpp deleted file mode 100644 index 438c51138ee..00000000000 --- a/libcxx/test/input.output/iostreams.base/stream.types/streamsize.pass.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// typedef SZ_T streamsize; - -#include -#include - -int main() -{ - static_assert(std::is_integral::value, ""); - static_assert(std::is_signed::value, ""); -} diff --git a/libcxx/test/input.output/iostreams.base/version.pass.cpp b/libcxx/test/input.output/iostreams.base/version.pass.cpp deleted file mode 100644 index f56846d38b8..00000000000 --- a/libcxx/test/input.output/iostreams.base/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.requirements/iostream.limits.imbue/tested_elsewhere.pass.cpp b/libcxx/test/input.output/iostreams.requirements/iostream.limits.imbue/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostreams.requirements/iostream.limits.imbue/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.requirements/iostreams.limits.pos/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostreams.requirements/iostreams.limits.pos/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostreams.requirements/iostreams.limits.pos/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.requirements/iostreams.threadsafety/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostreams.requirements/iostreams.threadsafety/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostreams.requirements/iostreams.threadsafety/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/iostreams.requirements/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostreams.requirements/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/iostreams.requirements/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/nothing_to_do.pass.cpp b/libcxx/test/input.output/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf.reqts/tested_elsewhere.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf.reqts/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf.reqts/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp deleted file mode 100644 index 469c7449971..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// basic_streambuf(const basic_streambuf& rhs); // protected - -#include -#include - -std::streambuf get(); - -int main() -{ - std::streambuf sb = get(); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp deleted file mode 100644 index c1e18392b6c..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp +++ /dev/null @@ -1,84 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// basic_streambuf(const basic_streambuf& rhs); - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - test() {} - - test(const test& t) - : std::basic_streambuf(t) - { - assert(this->eback() == t.eback()); - assert(this->gptr() == t.gptr()); - assert(this->egptr() == t.egptr()); - assert(this->pbase() == t.pbase()); - assert(this->pptr() == t.pptr()); - assert(this->epptr() == t.epptr()); - assert(this->getloc() == t.getloc()); - } - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - } -}; - -int main() -{ - { - test t; - test t2 = t; - } - { - test t; - test t2 = t; - } - { - char g1, g2, g3, p1, p3; - test t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test t2 = t; - } - { - wchar_t g1, g2, g3, p1, p3; - test t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test t2 = t; - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test t; - test t2 = t; - } - { - test t; - test t2 = t; - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp deleted file mode 100644 index 7f57f3cf930..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// basic_streambuf(); // is protected - -#include - -int main() -{ - std::basic_streambuf sb; -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp deleted file mode 100644 index d8ca8aebc62..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// basic_streambuf(); - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct test - : public std::basic_streambuf -{ - test() - { - assert(this->eback() == 0); - assert(this->gptr() == 0); - assert(this->egptr() == 0); - assert(this->pbase() == 0); - assert(this->pptr() == 0); - assert(this->epptr() == 0); - } -}; - -int main() -{ - { - test t; - assert(t.getloc().name() == "C"); - } - { - test t; - assert(t.getloc().name() == "C"); - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test t; - assert(t.getloc().name() == LOCALE_en_US_UTF_8); - } - { - test t; - assert(t.getloc().name() == LOCALE_en_US_UTF_8); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp deleted file mode 100644 index 2c77f25c2e5..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// pos_type pubseekoff(off_type off, ios_base::seekdir way, -// ios_base::openmode which = ios_base::in | ios_base::out); - -#include -#include - -template -struct test - : public std::basic_streambuf -{ - test() {} -}; - -int main() -{ - { - test t; - assert(t.pubseekoff(0, std::ios_base::beg) == -1); - assert(t.pubseekoff(0, std::ios_base::beg, std::ios_base::app) == -1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp deleted file mode 100644 index 0b9ddff4106..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// pos_type pubseekpos(pos_type sp, -// ios_base::openmode which = ios_base::in | ios_base::out; - -#include -#include - -template -struct test - : public std::basic_streambuf -{ - test() {} -}; - -int main() -{ - { - test t; - assert(t.pubseekpos(0, std::ios_base::app) == -1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp deleted file mode 100644 index 8cf62771e49..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// basic_streambuf* pubsetbuf(char_type* s, streamsize n); - -#include -#include - -template -struct test - : public std::basic_streambuf -{ - test() {} -}; - -int main() -{ - { - test t; - assert(t.pubsetbuf(0, 0) == &t); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp deleted file mode 100644 index cc167907161..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int pubsync(); - -#include -#include - -template -struct test - : public std::basic_streambuf -{ - test() {} -}; - -int main() -{ - { - test t; - assert(t.pubsync() == 0); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp deleted file mode 100644 index deb2dc7c139..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// REQUIRES: locale.en_US.UTF-8 -// REQUIRES: locale.fr_FR.UTF-8 - -// - -// template > -// class basic_streambuf; - -// locale pubimbue(const locale& loc); -// locale getloc() const; - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct test - : public std::basic_streambuf -{ - test() {} - - void imbue(const std::locale&) - { - assert(this->getloc().name() == LOCALE_en_US_UTF_8); - } -}; - -int main() -{ - { - test t; - assert(t.getloc().name() == "C"); - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test t; - assert(t.getloc().name() == LOCALE_en_US_UTF_8); - assert(t.pubimbue(std::locale(LOCALE_fr_FR_UTF_8)).name() == "en_US.UTF-8"); - assert(t.getloc().name() == LOCALE_fr_FR_UTF_8); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp deleted file mode 100644 index 200150639b9..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// streamsize in_avail(); - -#include -#include - -int showmanyc_called = 0; - -template -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } -protected: - std::streamsize showmanyc() - { - ++showmanyc_called; - return 5; - } -}; - -int main() -{ - { - test t; - assert(t.in_avail() == 5); - assert(showmanyc_called == 1); - char in[5]; - t.setg(in, in+2, in+5); - assert(t.in_avail() == 3); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp deleted file mode 100644 index ac6d0cc932a..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type sbumpc(); - -#include -#include - -int uflow_called = 0; - -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type uflow() - { - ++uflow_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(uflow_called == 0); - assert(t.sbumpc() == 'a'); - assert(uflow_called == 1); - char in[] = "ABC"; - t.setg(in, in, in+sizeof(in)); - assert(t.sbumpc() == 'A'); - assert(uflow_called == 1); - assert(t.sbumpc() == 'B'); - assert(uflow_called == 1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp deleted file mode 100644 index c68930cfa84..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type sgetc(); - -#include -#include - -int underflow_called = 0; - -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type underflow() - { - ++underflow_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(underflow_called == 0); - assert(t.sgetc() == 'a'); - assert(underflow_called == 1); - char in[] = "ABC"; - t.setg(in, in, in+sizeof(in)); - assert(t.sgetc() == 'A'); - assert(underflow_called == 1); - assert(t.sgetc() == 'A'); - assert(underflow_called == 1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp deleted file mode 100644 index 730cedeea76..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// streamsize sgetn(char_type* s, streamsize n); - -#include -#include - -int xsgetn_called = 0; - -struct test - : public std::basic_streambuf -{ - test() {} - -protected: - std::streamsize xsgetn(char_type* s, std::streamsize n) - { - ++xsgetn_called; - return 10; - } -}; - -int main() -{ - test t; - assert(xsgetn_called == 0); - assert(t.sgetn(0, 0) == 10); - assert(xsgetn_called == 1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp deleted file mode 100644 index 7f44245e26e..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type snextc(); - -#include -#include - -int uflow_called = 0; - -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type uflow() - { - ++uflow_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(uflow_called == 0); - assert(t.snextc() == -1); - assert(uflow_called == 1); - char in[] = "ABC"; - t.setg(in, in, in+sizeof(in)); - assert(t.snextc() == 'B'); - assert(uflow_called == 1); - assert(t.snextc() == 'C'); - assert(uflow_called == 1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp deleted file mode 100644 index 34a2a2dda37..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type sputbackc(char_type c); - -#include -#include - -int pbackfail_called = 0; - -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type pbackfail(int_type c = traits_type::eof()) - { - ++pbackfail_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(pbackfail_called == 0); - assert(t.sputbackc('A') == 'a'); - assert(pbackfail_called == 1); - char in[] = "ABC"; - t.setg(in, in+1, in+sizeof(in)); - assert(t.sputbackc('A') == 'A'); - assert(pbackfail_called == 1); - assert(t.sputbackc('A') == 'a'); - assert(pbackfail_called == 2); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp deleted file mode 100644 index 4c68fada07a..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type sungetc(); - -#include -#include - -int pbackfail_called = 0; - -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type pbackfail(int_type c = traits_type::eof()) - { - ++pbackfail_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(pbackfail_called == 0); - assert(t.sungetc() == 'a'); - assert(pbackfail_called == 1); - char in[] = "ABC"; - t.setg(in, in+1, in+sizeof(in)); - assert(t.sungetc() == 'A'); - assert(pbackfail_called == 1); - assert(t.sungetc() == 'a'); - assert(pbackfail_called == 2); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp deleted file mode 100644 index b04b8b0acc9..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type sputc(char_type c); - -#include -#include - -int overflow_called = 0; - -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - void setp(char* pbeg, char* pend) - { - base::setp(pbeg, pend); - } - -protected: - int_type overflow(int_type c = traits_type::eof()) - { - ++overflow_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(overflow_called == 0); - assert(t.sputc('A') == 'a'); - assert(overflow_called == 1); - char out[3] = {0}; - t.setp(out, out+sizeof(out)); - assert(t.sputc('A') == 'A'); - assert(overflow_called == 1); - assert(out[0] == 'A'); - assert(t.sputc('B') == 'B'); - assert(overflow_called == 1); - assert(out[0] == 'A'); - assert(out[1] == 'B'); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp deleted file mode 100644 index e03e8e0cbda..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// streamsize sputn(const char_type* s, streamsize n); - -#include -#include - -int xsputn_called = 0; - -struct test - : public std::basic_streambuf -{ - test() {} - -protected: - std::streamsize xsputn(const char_type* s, std::streamsize n) - { - ++xsputn_called; - return 5; - } -}; - -int main() -{ - test t; - assert(xsputn_called == 0); - assert(t.sputn(0, 0) == 5); - assert(xsputn_called == 1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp deleted file mode 100644 index 803198938f6..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// basic_streambuf& operator=(const basic_streambuf& rhs); - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - test() {} - - test& operator=(const test& t) - { - base::operator=(t); - assert(this->eback() == t.eback()); - assert(this->gptr() == t.gptr()); - assert(this->egptr() == t.egptr()); - assert(this->pbase() == t.pbase()); - assert(this->pptr() == t.pptr()); - assert(this->epptr() == t.epptr()); - assert(this->getloc() == t.getloc()); - return *this; - } - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - } -}; - -int main() -{ - { - test t; - test t2; - t2 = t; - } - { - test t; - test t2; - t2 = t; - } - { - char g1, g2, g3, p1, p3; - test t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test t2; - t2 = t; - } - { - wchar_t g1, g2, g3, p1, p3; - test t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test t2; - t2 = t; - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test t; - test t2; - t2 = t; - } - { - test t; - test t2; - t2 = t; - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp deleted file mode 100644 index 7a23206b42d..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp +++ /dev/null @@ -1,101 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// void swap(basic_streambuf& rhs); - -#include -#include - -#include "platform_support.h" // locale name macros - -template -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - test() {} - - void swap(test& t) - { - test old_this(*this); - test old_that(t); - base::swap(t); - assert(this->eback() == old_that.eback()); - assert(this->gptr() == old_that.gptr()); - assert(this->egptr() == old_that.egptr()); - assert(this->pbase() == old_that.pbase()); - assert(this->pptr() == old_that.pptr()); - assert(this->epptr() == old_that.epptr()); - assert(this->getloc() == old_that.getloc()); - - assert(t.eback() == old_this.eback()); - assert(t.gptr() == old_this.gptr()); - assert(t.egptr() == old_this.egptr()); - assert(t.pbase() == old_this.pbase()); - assert(t.pptr() == old_this.pptr()); - assert(t.epptr() == old_this.epptr()); - assert(t.getloc() == old_this.getloc()); - return *this; - } - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - } -}; - -int main() -{ - { - test t; - test t2; - swap(t2, t); - } - { - test t; - test t2; - swap(t2, t); - } - { - char g1, g2, g3, p1, p3; - test t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test t2; - swap(t2, t); - } - { - wchar_t g1, g2, g3, p1, p3; - test t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test t2; - swap(t2, t); - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test t; - test t2; - swap(t2, t); - } - { - test t; - test t2; - swap(t2, t); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp deleted file mode 100644 index ce25a191914..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// void gbump(int n); - -#include -#include - -template -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } - - void gbump(int n) - { - CharT* gbeg = base::eback(); - CharT* gnext = base::gptr(); - CharT* gend = base::egptr(); - base::gbump(n); - assert(base::eback() == gbeg); - assert(base::gptr() == gnext+n); - assert(base::egptr() == gend); - } -}; - -int main() -{ - { - test t; - char in[] = "ABCDE"; - t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); - t.gbump(2); - } - { - test t; - wchar_t in[] = L"ABCDE"; - t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); - t.gbump(3); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp deleted file mode 100644 index 68dcf6eab8f..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// void setg(char_type* gbeg, char_type* gnext, char_type* gend); - -#include -#include - -template -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - assert(base::eback() == gbeg); - assert(base::gptr() == gnext); - assert(base::egptr() == gend); - } -}; - -int main() -{ - { - test t; - char in[] = "ABC"; - t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); - } - { - test t; - wchar_t in[] = L"ABC"; - t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp deleted file mode 100644 index 47ef939142a..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// void pbump(int n); - -#include -#include - -template -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - } - - void pbump(int n) - { - CharT* pbeg = base::pbase(); - CharT* pnext = base::pptr(); - CharT* pend = base::epptr(); - base::pbump(n); - assert(base::pbase() == pbeg); - assert(base::pptr() == pnext+n); - assert(base::epptr() == pend); - } -}; - -int main() -{ - { - test t; - char in[] = "ABCDE"; - t.setp(in, in+sizeof(in)/sizeof(in[0])); - t.pbump(2); - t.pbump(1); - } - { - test t; - wchar_t in[] = L"ABCDE"; - t.setp(in, in+sizeof(in)/sizeof(in[0])); - t.pbump(3); - t.pbump(1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp deleted file mode 100644 index fa4133a475d..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// void setp(char_type* pbeg, char_type* pend); - -#include -#include - -template -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - assert(base::pbase() == pbeg); - assert(base::pptr() == pbeg); - assert(base::epptr() == pend); - } -}; - -int main() -{ - { - test t; - char in[] = "ABC"; - t.setp(in, in+sizeof(in)/sizeof(in[0])); - } - { - test t; - wchar_t in[] = L"ABC"; - t.setp(in, in+sizeof(in)/sizeof(in[0])); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp deleted file mode 100644 index acaf1e8461e..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// streamsize showmanyc(); - -#include -#include - -int showmanyc_called = 0; - -template -struct test - : public std::basic_streambuf -{ - test() {} -}; - -int main() -{ - test t; - assert(t.in_avail() == 0); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp deleted file mode 100644 index d25ae9b21bf..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type uflow(); - -#include -#include - -int underflow_called = 0; - -struct test - : public std::basic_streambuf -{ - test() {} - -}; - -int main() -{ - test t; - assert(t.sgetc() == -1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp deleted file mode 100644 index 1bdba0714f1..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type underflow(); - -#include -#include - -struct test - : public std::basic_streambuf -{ - test() {} -}; - -int main() -{ - test t; - assert(t.sgetc() == -1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp deleted file mode 100644 index b1f15427367..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// streamsize xsgetn(char_type* s, streamsize n); - -#include -#include - -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } -}; - -int main() -{ - test t; - char input[7] = "123456"; - t.setg(input, input, input+7); - char output[sizeof(input)] = {0}; - assert(t.sgetn(output, 10) == 7); - assert(strcmp(input, output) == 0); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp deleted file mode 100644 index 3a10d8a70ad..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type pbackfail(int_type c = traits::eof()); - -#include -#include - -int pbackfail_called = 0; - -struct test - : public std::basic_streambuf -{ - test() {} -}; - -int main() -{ - test t; - assert(t.sputbackc('A') == -1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp deleted file mode 100644 index dcdd45f5ff1..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// int_type overflow(int_type c = traits::eof()); - -#include -#include - -struct test - : public std::basic_streambuf -{ - test() {} -}; - -int main() -{ - test t; - assert(t.sputc('A') == -1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp deleted file mode 100644 index 93dc15401e9..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf; - -// streamsize xsputn(const char_type* s, streamsize n); - -#include -#include - -struct test - : public std::basic_streambuf -{ - typedef std::basic_streambuf base; - - test() {} - - void setp(char* pbeg, char* pend) - { - base::setp(pbeg, pend); - } -}; - -int main() -{ - { - test t; - char in[] = "123456"; - assert(t.sputn(in, sizeof(in)) == 0); - char out[sizeof(in)] = {0}; - t.setp(out, out+sizeof(out)); - assert(t.sputn(in, sizeof(in)) == sizeof(in)); - assert(strcmp(in, out) == 0); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/types.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/types.pass.cpp deleted file mode 100644 index 919caee3655..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/types.pass.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class basic_streambuf -// { -// public: -// // types: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include -#include - -int main() -{ - static_assert((std::is_same::value), ""); - static_assert((std::is_same >::value), ""); - static_assert((std::is_same::int_type>::value), ""); - static_assert((std::is_same::pos_type>::value), ""); - static_assert((std::is_same::off_type>::value), ""); - - static_assert((std::is_same::value), ""); - static_assert((std::is_same >::value), ""); - static_assert((std::is_same::int_type>::value), ""); - static_assert((std::is_same::pos_type>::value), ""); - static_assert((std::is_same::off_type>::value), ""); -} diff --git a/libcxx/test/input.output/stream.buffers/version.pass.cpp b/libcxx/test/input.output/stream.buffers/version.pass.cpp deleted file mode 100644 index c4b06be6018..00000000000 --- a/libcxx/test/input.output/stream.buffers/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp deleted file mode 100644 index fc5f2e7e920..00000000000 --- a/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_istringstream - -// void swap(basic_istringstream& rhs); - -#include -#include - -int main() -{ - { - std::istringstream ss0(" 123 456"); - std::istringstream ss(" 789 321"); - ss.swap(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss0 >> i; - assert(i == 789); - ss0 >> i; - assert(i == 321); - } - { - std::wistringstream ss0(L" 123 456"); - std::wistringstream ss(L" 789 321"); - ss.swap(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss0 >> i; - assert(i == 789); - ss0 >> i; - assert(i == 321); - } -} diff --git a/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp deleted file mode 100644 index e57ad55c907..00000000000 --- a/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp +++ /dev/null @@ -1,86 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_istringstream - -// basic_istringstream& operator=(basic_istringstream&& rhs); - -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::istringstream ss0(" 123 456"); - std::istringstream ss; - ss = std::move(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - } - { - std::istringstream s1("Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd"); - std::string s; - s1 >> s; - - std::istringstream s2 = std::move(s1); - s2 >> s; - assert(s == "Bbbbb"); - - std::istringstream s3; - s3 = std::move(s2); - s3 >> s; - assert(s == "Cccccccccc"); - - s1 = std::move(s3); - s1 >> s; - assert(s == "Dddddddddddddddddd"); - } - { - std::wistringstream ss0(L" 123 456"); - std::wistringstream ss; - ss = std::move(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - } - { - std::wistringstream s1(L"Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd"); - std::wstring s; - s1 >> s; - - std::wistringstream s2 = std::move(s1); - s2 >> s; - assert(s == L"Bbbbb"); - - std::wistringstream s3; - s3 = std::move(s2); - s3 >> s; - assert(s == L"Cccccccccc"); - - s1 = std::move(s3); - s1 >> s; - assert(s == L"Dddddddddddddddddd"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp deleted file mode 100644 index d72cef16076..00000000000 --- a/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_istringstream - -// template -// void -// swap(basic_istringstream& x, -// basic_istringstream& y); - -#include -#include - -int main() -{ - { - std::istringstream ss0(" 123 456"); - std::istringstream ss(" 789 321"); - swap(ss, ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss0 >> i; - assert(i == 789); - ss0 >> i; - assert(i == 321); - } - { - std::wistringstream ss0(L" 123 456"); - std::wistringstream ss(L" 789 321"); - swap(ss, ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss0 >> i; - assert(i == 789); - ss0 >> i; - assert(i == 321); - } -} diff --git a/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp deleted file mode 100644 index 5d44a50a3f6..00000000000 --- a/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_istringstream - -// explicit basic_istringstream(ios_base::openmode which = ios_base::in); - -#include -#include - -int main() -{ - { - std::istringstream ss; - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == ""); - } - { - std::istringstream ss(std::ios_base::in); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == ""); - } - { - std::wistringstream ss; - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L""); - } - { - std::wistringstream ss(std::ios_base::in); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L""); - } -} diff --git a/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp deleted file mode 100644 index adc46ab65f5..00000000000 --- a/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_istringstream - -// basic_istringstream(basic_istringstream&& rhs); - -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::istringstream ss0(" 123 456"); - std::istringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - } - { - std::wistringstream ss0(L" 123 456"); - std::wistringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp deleted file mode 100644 index 97792363969..00000000000 --- a/libcxx/test/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_istringstream - -// explicit basic_istringstream(const basic_string& str, -// ios_base::openmode which = ios_base::in); - -#include -#include - -int main() -{ - { - std::istringstream ss(" 123 456"); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - } - { - std::istringstream ss(" 123 456", std::ios_base::out); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - } - { - std::wistringstream ss(L" 123 456"); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - } - { - std::wistringstream ss(L" 123 456", std::ios_base::out); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - } -} diff --git a/libcxx/test/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp deleted file mode 100644 index 448a6f89b25..00000000000 --- a/libcxx/test/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_istringstream - -// void str(const basic_string& s); - -#include -#include - -int main() -{ - { - std::istringstream ss(" 123 456"); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss.str(" 789"); - ss.clear(); - assert(ss.good()); - assert(ss.str() == " 789"); - ss >> i; - assert(i == 789); - } - { - std::wistringstream ss(L" 123 456"); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss.str(L" 789"); - ss.clear(); - assert(ss.good()); - assert(ss.str() == L" 789"); - ss >> i; - assert(i == 789); - } -} diff --git a/libcxx/test/input.output/string.streams/istringstream/types.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/types.pass.cpp deleted file mode 100644 index 349bcae1a1c..00000000000 --- a/libcxx/test/input.output/string.streams/istringstream/types.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_istringstream -// : public basic_istream -// { -// public: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; -// typedef Allocator allocator_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_istringstream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); - static_assert((std::is_same::allocator_type, std::allocator >::value), ""); -} diff --git a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp b/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp deleted file mode 100644 index eff47452c58..00000000000 --- a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_ostringstream - -// void swap(basic_ostringstream& rhs); - -#include -#include - -int main() -{ - { - std::ostringstream ss0(" 123 456"); - std::ostringstream ss; - ss.swap(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == "234 5676"); - ss0 << i << ' ' << 567;; - assert(ss0.str() == "234 567"); - } - { - std::wostringstream ss0(L" 123 456"); - std::wostringstream ss; - ss.swap(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == L"234 5676"); - ss0 << i << ' ' << 567;; - assert(ss0.str() == L"234 567"); - } -} diff --git a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp b/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp deleted file mode 100644 index a6fb8ba69b2..00000000000 --- a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_ostringstream - -// basic_ostringstream& operator=(basic_ostringstream&& rhs); - -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::ostringstream ss0(" 123 456"); - std::ostringstream ss; - ss = std::move(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == "234 5676"); - } - { - std::wostringstream ss0(L" 123 456"); - std::wostringstream ss; - ss = std::move(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == L"234 5676"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp b/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp deleted file mode 100644 index 3d7081d8e24..00000000000 --- a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_ostringstream - -// void swap(basic_ostringstream& rhs); - -#include -#include - -int main() -{ - { - std::ostringstream ss0(" 123 456"); - std::ostringstream ss; - swap(ss, ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == "234 5676"); - ss0 << i << ' ' << 567;; - assert(ss0.str() == "234 567"); - } - { - std::wostringstream ss0(L" 123 456"); - std::wostringstream ss; - swap(ss, ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == L"234 5676"); - ss0 << i << ' ' << 567;; - assert(ss0.str() == L"234 567"); - } -} diff --git a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp b/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp deleted file mode 100644 index dde1dc71923..00000000000 --- a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_ostringstream - -// explicit basic_ostringstream(ios_base::openmode which = ios_base::in); - -#include -#include - -int main() -{ - { - std::ostringstream ss; - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == ""); - } - { - std::ostringstream ss(std::ios_base::out); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == ""); - } - { - std::wostringstream ss; - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L""); - } - { - std::wostringstream ss(std::ios_base::out); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L""); - } -} diff --git a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp b/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp deleted file mode 100644 index dc63b59fe39..00000000000 --- a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_ostringstream - -// basic_ostringstream(basic_ostringstream&& rhs); - -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::ostringstream ss0(" 123 456"); - std::ostringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == "234 5676"); - } - { - std::wostringstream ss0(L" 123 456"); - std::wostringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == L"234 5676"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp b/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp deleted file mode 100644 index 89c91bdee05..00000000000 --- a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_ostringstream - -// explicit basic_ostringstream(const basic_string& str, -// ios_base::openmode which = ios_base::in); - -#include -#include - -int main() -{ - { - std::ostringstream ss(" 123 456"); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == "234 5676"); - } - { - std::ostringstream ss(" 123 456", std::ios_base::in); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == "234 5676"); - } - { - std::wostringstream ss(L" 123 456"); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == L"234 5676"); - } - { - std::wostringstream ss(L" 123 456", std::ios_base::in); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 234; - ss << i << ' ' << 567;; - assert(ss.str() == L"234 5676"); - } -} diff --git a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp b/libcxx/test/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp deleted file mode 100644 index ab277a2eeac..00000000000 --- a/libcxx/test/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_ostringstream - -// void str(const basic_string& s); - -#include -#include - -int main() -{ - { - std::ostringstream ss(" 123 456"); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456"); - int i = 0; - ss << i; - assert(ss.str() == "0123 456"); - ss << 456; - assert(ss.str() == "0456 456"); - ss.str(" 789"); - assert(ss.str() == " 789"); - ss << "abc"; - assert(ss.str() == "abc9"); - } - { - std::wostringstream ss(L" 123 456"); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456"); - int i = 0; - ss << i; - assert(ss.str() == L"0123 456"); - ss << 456; - assert(ss.str() == L"0456 456"); - ss.str(L" 789"); - assert(ss.str() == L" 789"); - ss << L"abc"; - assert(ss.str() == L"abc9"); - } -} diff --git a/libcxx/test/input.output/string.streams/ostringstream/types.pass.cpp b/libcxx/test/input.output/string.streams/ostringstream/types.pass.cpp deleted file mode 100644 index c9cb763784e..00000000000 --- a/libcxx/test/input.output/string.streams/ostringstream/types.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_ostringstream -// : public basic_ostream -// { -// public: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; -// typedef Allocator allocator_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_ostringstream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); - static_assert((std::is_same::allocator_type, std::allocator >::value), ""); -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/member_swap.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/member_swap.pass.cpp deleted file mode 100644 index eaca7245461..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/member_swap.pass.cpp +++ /dev/null @@ -1,64 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// void swap(basic_stringbuf& rhs); - -#include -#include - -int main() -{ - { - std::stringbuf buf1("testing"); - std::stringbuf buf; - buf.swap(buf1); - assert(buf.str() == "testing"); - assert(buf1.str() == ""); - } - { - std::stringbuf buf1("testing", std::ios_base::in); - std::stringbuf buf; - buf.swap(buf1); - assert(buf.str() == "testing"); - assert(buf1.str() == ""); - } - { - std::stringbuf buf1("testing", std::ios_base::out); - std::stringbuf buf; - buf.swap(buf1); - assert(buf.str() == "testing"); - assert(buf1.str() == ""); - } - { - std::wstringbuf buf1(L"testing"); - std::wstringbuf buf; - buf.swap(buf1); - assert(buf.str() == L"testing"); - assert(buf1.str() == L""); - } - { - std::wstringbuf buf1(L"testing", std::ios_base::in); - std::wstringbuf buf; - buf.swap(buf1); - assert(buf.str() == L"testing"); - assert(buf1.str() == L""); - } - { - std::wstringbuf buf1(L"testing", std::ios_base::out); - std::wstringbuf buf; - buf.swap(buf1); - assert(buf.str() == L"testing"); - assert(buf1.str() == L""); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp deleted file mode 100644 index 716b6afa755..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// basic_stringbuf& operator=(basic_stringbuf&& rhs); - -#include -#include - -int main() -{ - { - std::stringbuf buf1("testing"); - std::stringbuf buf; - buf = move(buf1); - assert(buf.str() == "testing"); - } - { - std::stringbuf buf1("testing", std::ios_base::in); - std::stringbuf buf; - buf = move(buf1); - assert(buf.str() == "testing"); - } - { - std::stringbuf buf1("testing", std::ios_base::out); - std::stringbuf buf; - buf = move(buf1); - assert(buf.str() == "testing"); - } - { - std::wstringbuf buf1(L"testing"); - std::wstringbuf buf; - buf = move(buf1); - assert(buf.str() == L"testing"); - } - { - std::wstringbuf buf1(L"testing", std::ios_base::in); - std::wstringbuf buf; - buf = move(buf1); - assert(buf.str() == L"testing"); - } - { - std::wstringbuf buf1(L"testing", std::ios_base::out); - std::wstringbuf buf; - buf = move(buf1); - assert(buf.str() == L"testing"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/nonmember_swap.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/nonmember_swap.pass.cpp deleted file mode 100644 index dca637d39fa..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.assign/nonmember_swap.pass.cpp +++ /dev/null @@ -1,66 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// template -// void swap(basic_stringbuf& x, -// basic_stringbuf& y); - -#include -#include - -int main() -{ - { - std::stringbuf buf1("testing"); - std::stringbuf buf; - swap(buf, buf1); - assert(buf.str() == "testing"); - assert(buf1.str() == ""); - } - { - std::stringbuf buf1("testing", std::ios_base::in); - std::stringbuf buf; - swap(buf, buf1); - assert(buf.str() == "testing"); - assert(buf1.str() == ""); - } - { - std::stringbuf buf1("testing", std::ios_base::out); - std::stringbuf buf; - swap(buf, buf1); - assert(buf.str() == "testing"); - assert(buf1.str() == ""); - } - { - std::wstringbuf buf1(L"testing"); - std::wstringbuf buf; - swap(buf, buf1); - assert(buf.str() == L"testing"); - assert(buf1.str() == L""); - } - { - std::wstringbuf buf1(L"testing", std::ios_base::in); - std::wstringbuf buf; - swap(buf, buf1); - assert(buf.str() == L"testing"); - assert(buf1.str() == L""); - } - { - std::wstringbuf buf1(L"testing", std::ios_base::out); - std::wstringbuf buf; - swap(buf, buf1); - assert(buf.str() == L"testing"); - assert(buf1.str() == L""); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp deleted file mode 100644 index 28007c8edf4..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// explicit basic_stringbuf(ios_base::openmode which = ios_base::in | ios_base::out); - -#include -#include - -int main() -{ - { - std::stringbuf buf; - assert(buf.str() == ""); - } - { - std::wstringbuf buf; - assert(buf.str() == L""); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp deleted file mode 100644 index 14fd0caa5cb..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// basic_stringbuf(basic_stringbuf&& rhs); - -#include -#include - -int main() -{ - { - std::stringbuf buf1("testing"); - std::stringbuf buf(move(buf1)); - assert(buf.str() == "testing"); - } - { - std::stringbuf buf1("testing", std::ios_base::in); - std::stringbuf buf(move(buf1)); - assert(buf.str() == "testing"); - } - { - std::stringbuf buf1("testing", std::ios_base::out); - std::stringbuf buf(move(buf1)); - assert(buf.str() == "testing"); - } - { - std::wstringbuf buf1(L"testing"); - std::wstringbuf buf(move(buf1)); - assert(buf.str() == L"testing"); - } - { - std::wstringbuf buf1(L"testing", std::ios_base::in); - std::wstringbuf buf(move(buf1)); - assert(buf.str() == L"testing"); - } - { - std::wstringbuf buf1(L"testing", std::ios_base::out); - std::wstringbuf buf(move(buf1)); - assert(buf.str() == L"testing"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/string.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/string.pass.cpp deleted file mode 100644 index eae1b0b8765..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.cons/string.pass.cpp +++ /dev/null @@ -1,47 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// explicit basic_stringbuf(const basic_string& s, -// ios_base::openmode which = ios_base::in | ios_base::out); - -#include -#include - -int main() -{ - { - std::stringbuf buf("testing"); - assert(buf.str() == "testing"); - } - { - std::stringbuf buf("testing", std::ios_base::in); - assert(buf.str() == "testing"); - } - { - std::stringbuf buf("testing", std::ios_base::out); - assert(buf.str() == "testing"); - } - { - std::wstringbuf buf(L"testing"); - assert(buf.str() == L"testing"); - } - { - std::wstringbuf buf(L"testing", std::ios_base::in); - assert(buf.str() == L"testing"); - } - { - std::wstringbuf buf(L"testing", std::ios_base::out); - assert(buf.str() == L"testing"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp deleted file mode 100644 index 712e0edd27b..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// void str(const basic_string& s); - -#include -#include - -int main() -{ - { - std::stringbuf buf("testing"); - assert(buf.str() == "testing"); - buf.str("another test"); - assert(buf.str() == "another test"); - } - { - std::wstringbuf buf(L"testing"); - assert(buf.str() == L"testing"); - buf.str(L"another test"); - assert(buf.str() == L"another test"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp deleted file mode 100644 index 3abf9423a12..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp +++ /dev/null @@ -1,97 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// int_type overflow(int_type c = traits::eof()); - -#include -#include - -int overflow_called = 0; - -template -struct testbuf - : public std::basic_stringbuf -{ - typedef std::basic_stringbuf base; - explicit testbuf(const std::basic_string& str, - std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) - : base(str, which) {} - - typename base::int_type - overflow(typename base::int_type c = base::type_traits::eof()) - {++overflow_called; return base::overflow(c);} - - void pbump(int n) {base::pbump(n);} -}; - -int main() -{ - { - testbuf sb("abc"); - assert(sb.sputc('1') == '1'); - assert(sb.str() == "1bc"); - assert(sb.sputc('2') == '2'); - assert(sb.str() == "12c"); - assert(sb.sputc('3') == '3'); - assert(sb.str() == "123"); - assert(sb.sputc('4') == '4'); - assert(sb.str() == "1234"); - assert(sb.sputc('5') == '5'); - assert(sb.str() == "12345"); - assert(sb.sputc('6') == '6'); - assert(sb.str() == "123456"); - assert(sb.sputc('7') == '7'); - assert(sb.str() == "1234567"); - assert(sb.sputc('8') == '8'); - assert(sb.str() == "12345678"); - assert(sb.sputc('9') == '9'); - assert(sb.str() == "123456789"); - assert(sb.sputc('0') == '0'); - assert(sb.str() == "1234567890"); - assert(sb.sputc('1') == '1'); - assert(sb.str() == "12345678901"); - } - { - testbuf sb(L"abc"); - assert(sb.sputc(L'1') == L'1'); - assert(sb.str() == L"1bc"); - assert(sb.sputc(L'2') == L'2'); - assert(sb.str() == L"12c"); - assert(sb.sputc(L'3') == L'3'); - assert(sb.str() == L"123"); - assert(sb.sputc(L'4') == L'4'); - assert(sb.str() == L"1234"); - assert(sb.sputc(L'5') == L'5'); - assert(sb.str() == L"12345"); - assert(sb.sputc(L'6') == L'6'); - assert(sb.str() == L"123456"); - assert(sb.sputc(L'7') == L'7'); - assert(sb.str() == L"1234567"); - assert(sb.sputc(L'8') == L'8'); - assert(sb.str() == L"12345678"); - assert(sb.sputc(L'9') == L'9'); - assert(sb.str() == L"123456789"); - assert(sb.sputc(L'0') == L'0'); - assert(sb.str() == L"1234567890"); - assert(sb.sputc(L'1') == L'1'); - assert(sb.str() == L"12345678901"); - } - { - testbuf sb("abc", std::ios_base::app | std::ios_base::out); - assert(sb.sputc('1') == '1'); - assert(sb.str() == "abc1"); - assert(sb.sputc('2') == '2'); - assert(sb.str() == "abc12"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp deleted file mode 100644 index 4af0e63029a..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp +++ /dev/null @@ -1,92 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// int_type pbackfail(int_type c = traits::eof()); - -#include -#include - -template -struct testbuf - : public std::basic_stringbuf -{ - typedef std::basic_stringbuf base; - explicit testbuf(const std::basic_string& str, - std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) - : base(str, which) {} - - typename base::int_type - pbackfail(typename base::int_type c = base::type_traits::eof()) - {return base::pbackfail(c);} - - void pbump(int n) {base::pbump(n);} -}; - -int main() -{ - { - testbuf sb("123", std::ios_base::in); - assert(sb.sgetc() == '1'); - assert(sb.snextc() == '2'); - assert(sb.snextc() == '3'); - assert(sb.sgetc() == '3'); - assert(sb.snextc() == std::char_traits::eof()); - assert(sb.pbackfail('3') == '3'); - assert(sb.pbackfail('3') == std::char_traits::eof()); - assert(sb.pbackfail('2') == '2'); - assert(sb.pbackfail(std::char_traits::eof()) != std::char_traits::eof()); - assert(sb.pbackfail(std::char_traits::eof()) == std::char_traits::eof()); - assert(sb.str() == "123"); - } - { - testbuf sb("123"); - assert(sb.sgetc() == '1'); - assert(sb.snextc() == '2'); - assert(sb.snextc() == '3'); - assert(sb.sgetc() == '3'); - assert(sb.snextc() == std::char_traits::eof()); - assert(sb.pbackfail('3') == '3'); - assert(sb.pbackfail('3') == '3'); - assert(sb.pbackfail(std::char_traits::eof()) != std::char_traits::eof()); - assert(sb.pbackfail(std::char_traits::eof()) == std::char_traits::eof()); - assert(sb.str() == "133"); - } - { - testbuf sb(L"123", std::ios_base::in); - assert(sb.sgetc() == L'1'); - assert(sb.snextc() == L'2'); - assert(sb.snextc() == L'3'); - assert(sb.sgetc() == L'3'); - assert(sb.snextc() == std::char_traits::eof()); - assert(sb.pbackfail(L'3') == L'3'); - assert(sb.pbackfail(L'3') == std::char_traits::eof()); - assert(sb.pbackfail(L'2') == L'2'); - assert(sb.pbackfail(std::char_traits::eof()) != std::char_traits::eof()); - assert(sb.pbackfail(std::char_traits::eof()) == std::char_traits::eof()); - assert(sb.str() == L"123"); - } - { - testbuf sb(L"123"); - assert(sb.sgetc() == L'1'); - assert(sb.snextc() == L'2'); - assert(sb.snextc() == L'3'); - assert(sb.sgetc() == L'3'); - assert(sb.snextc() == std::char_traits::eof()); - assert(sb.pbackfail(L'3') == L'3'); - assert(sb.pbackfail(L'3') == L'3'); - assert(sb.pbackfail(std::char_traits::eof()) != std::char_traits::eof()); - assert(sb.pbackfail(std::char_traits::eof()) == std::char_traits::eof()); - assert(sb.str() == L"133"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp deleted file mode 100644 index 6d20db13189..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp +++ /dev/null @@ -1,143 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// pos_type seekoff(off_type off, ios_base::seekdir way, -// ios_base::openmode which = ios_base::in | ios_base::out); - -#include -#include - -int main() -{ - { - std::stringbuf sb("0123456789", std::ios_base::in); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == -1); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in | std::ios_base::out) == -1); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in | std::ios_base::out) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in | std::ios_base::out) == -1); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); - assert(sb.sgetc() == '3'); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == 6); - assert(sb.sgetc() == '6'); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in) == 7); - assert(sb.sgetc() == '7'); - } - { - std::stringbuf sb("0123456789", std::ios_base::out); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == -1); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in) == -1); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == 3); - assert(sb.sputc('a') == 'a'); - assert(sb.str() == "012a456789"); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == 7); - assert(sb.sputc('b') == 'b'); - assert(sb.str() == "012a456b89"); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == 7); - assert(sb.sputc('c') == 'c'); - assert(sb.str() == "012a456c89"); - } - { - std::stringbuf sb("0123456789"); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); - assert(sb.sgetc() == '3'); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == 6); - assert(sb.sgetc() == '6'); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in) == 7); - assert(sb.sgetc() == '7'); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out | std::ios_base::in) == 3); - assert(sb.sgetc() == '3'); - assert(sb.sputc('a') == 'a'); - assert(sb.str() == "012a456789"); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out | std::ios_base::in) == 7); - assert(sb.sgetc() == '7'); - assert(sb.sputc('c') == 'c'); - assert(sb.str() == "012a456c89"); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == 3); - assert(sb.sputc('3') == '3'); - assert(sb.str() == "0123456c89"); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == 7); - assert(sb.sputc('7') == '7'); - assert(sb.str() == "0123456789"); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == 7); - assert(sb.sputc('c') == 'c'); - assert(sb.str() == "0123456c89"); - } - { - std::wstringbuf sb(L"0123456789", std::ios_base::in); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == -1); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in | std::ios_base::out) == -1); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in | std::ios_base::out) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in | std::ios_base::out) == -1); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); - assert(sb.sgetc() == L'3'); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == 6); - assert(sb.sgetc() == L'6'); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in) == 7); - assert(sb.sgetc() == L'7'); - } - { - std::wstringbuf sb(L"0123456789", std::ios_base::out); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == -1); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in) == -1); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == 3); - assert(sb.sputc(L'a') == L'a'); - assert(sb.str() == L"012a456789"); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == 7); - assert(sb.sputc(L'b') == L'b'); - assert(sb.str() == L"012a456b89"); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == 7); - assert(sb.sputc(L'c') == L'c'); - assert(sb.str() == L"012a456c89"); - } - { - std::wstringbuf sb(L"0123456789"); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); - assert(sb.sgetc() == L'3'); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == 6); - assert(sb.sgetc() == L'6'); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in) == 7); - assert(sb.sgetc() == L'7'); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out | std::ios_base::in) == 3); - assert(sb.sgetc() == L'3'); - assert(sb.sputc(L'a') == L'a'); - assert(sb.str() == L"012a456789"); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out | std::ios_base::in) == 7); - assert(sb.sgetc() == L'7'); - assert(sb.sputc(L'c') == L'c'); - assert(sb.str() == L"012a456c89"); - assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == 3); - assert(sb.sputc(L'3') == L'3'); - assert(sb.str() == L"0123456c89"); - assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == 7); - assert(sb.sputc(L'7') == L'7'); - assert(sb.str() == L"0123456789"); - assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == 7); - assert(sb.sputc(L'c') == L'c'); - assert(sb.str() == L"0123456c89"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp deleted file mode 100644 index 2b809a887a3..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp +++ /dev/null @@ -1,77 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// pos_type seekpos(pos_type sp, -// ios_base::openmode which = ios_base::in | ios_base::out); - -#include -#include - -int main() -{ - { - std::stringbuf sb("0123456789", std::ios_base::in); - assert(sb.pubseekpos(3, std::ios_base::out) == -1); - assert(sb.pubseekpos(3, std::ios_base::in | std::ios_base::out) == -1); - assert(sb.pubseekpos(3, std::ios_base::in) == 3); - assert(sb.sgetc() == '3'); - } - { - std::stringbuf sb("0123456789", std::ios_base::out); - assert(sb.pubseekpos(3, std::ios_base::in) == -1); - assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekpos(3, std::ios_base::out) == 3); - assert(sb.sputc('a') == 'a'); - assert(sb.str() == "012a456789"); - } - { - std::stringbuf sb("0123456789"); - assert(sb.pubseekpos(3, std::ios_base::in) == 3); - assert(sb.sgetc() == '3'); - assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == 3); - assert(sb.sgetc() == '3'); - assert(sb.sputc('a') == 'a'); - assert(sb.str() == "012a456789"); - assert(sb.pubseekpos(3, std::ios_base::out) == 3); - assert(sb.sputc('3') == '3'); - assert(sb.str() == "0123456789"); - } - { - std::wstringbuf sb(L"0123456789", std::ios_base::in); - assert(sb.pubseekpos(3, std::ios_base::out) == -1); - assert(sb.pubseekpos(3, std::ios_base::in | std::ios_base::out) == -1); - assert(sb.pubseekpos(3, std::ios_base::in) == 3); - assert(sb.sgetc() == L'3'); - } - { - std::wstringbuf sb(L"0123456789", std::ios_base::out); - assert(sb.pubseekpos(3, std::ios_base::in) == -1); - assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == -1); - assert(sb.pubseekpos(3, std::ios_base::out) == 3); - assert(sb.sputc(L'a') == L'a'); - assert(sb.str() == L"012a456789"); - } - { - std::wstringbuf sb(L"0123456789"); - assert(sb.pubseekpos(3, std::ios_base::in) == 3); - assert(sb.sgetc() == L'3'); - assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == 3); - assert(sb.sgetc() == L'3'); - assert(sb.sputc(L'a') == L'a'); - assert(sb.str() == L"012a456789"); - assert(sb.pubseekpos(3, std::ios_base::out) == 3); - assert(sb.sputc(L'3') == L'3'); - assert(sb.str() == L"0123456789"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/setbuf.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/setbuf.pass.cpp deleted file mode 100644 index 7130f5b8646..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/setbuf.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// basic_streambuf* setbuf(charT* s, streamsize n); - -#include -#include - -int main() -{ - { - std::stringbuf sb("0123456789"); - assert(sb.pubsetbuf(0, 0) == &sb); - assert(sb.str() == "0123456789"); - } - { - std::wstringbuf sb(L"0123456789"); - assert(sb.pubsetbuf(0, 0) == &sb); - assert(sb.str() == L"0123456789"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/underflow.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/underflow.pass.cpp deleted file mode 100644 index 3641af239d7..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/stringbuf.virtuals/underflow.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf - -// int_type underflow(); - -#include -#include - -template -struct testbuf - : public std::basic_stringbuf -{ - typedef std::basic_stringbuf base; - explicit testbuf(const std::basic_string& str) - : base(str) {} - - typename base::int_type underflow() {return base::underflow();} - void pbump(int n) {base::pbump(n);} -}; - -int main() -{ - { - testbuf sb("123"); - sb.pbump(3); - assert(sb.underflow() == '1'); - assert(sb.underflow() == '1'); - assert(sb.snextc() == '2'); - assert(sb.underflow() == '2'); - assert(sb.underflow() == '2'); - assert(sb.snextc() == '3'); - assert(sb.underflow() == '3'); - assert(sb.underflow() == '3'); - assert(sb.snextc() == std::char_traits::eof()); - assert(sb.underflow() == std::char_traits::eof()); - assert(sb.underflow() == std::char_traits::eof()); - sb.sputc('4'); - assert(sb.underflow() == '4'); - assert(sb.underflow() == '4'); - } - { - testbuf sb(L"123"); - sb.pbump(3); - assert(sb.underflow() == L'1'); - assert(sb.underflow() == L'1'); - assert(sb.snextc() == L'2'); - assert(sb.underflow() == L'2'); - assert(sb.underflow() == L'2'); - assert(sb.snextc() == L'3'); - assert(sb.underflow() == L'3'); - assert(sb.underflow() == L'3'); - assert(sb.snextc() == std::char_traits::eof()); - assert(sb.underflow() == std::char_traits::eof()); - assert(sb.underflow() == std::char_traits::eof()); - sb.sputc(L'4'); - assert(sb.underflow() == L'4'); - assert(sb.underflow() == L'4'); - } -} diff --git a/libcxx/test/input.output/string.streams/stringbuf/types.pass.cpp b/libcxx/test/input.output/string.streams/stringbuf/types.pass.cpp deleted file mode 100644 index 067a3a29e0f..00000000000 --- a/libcxx/test/input.output/string.streams/stringbuf/types.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringbuf -// : public basic_streambuf -// { -// public: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; -// typedef Allocator allocator_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_stringbuf >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); - static_assert((std::is_same::allocator_type, std::allocator >::value), ""); -} diff --git a/libcxx/test/input.output/string.streams/stringstream.cons/default.pass.cpp b/libcxx/test/input.output/string.streams/stringstream.cons/default.pass.cpp deleted file mode 100644 index b8905ade340..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream.cons/default.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream - -// explicit basic_stringstream(ios_base::openmode which = ios_base::out|ios_base::in); - -#include -#include - -int main() -{ - { - std::stringstream ss; - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == ""); - } - { - std::stringstream ss(std::ios_base::in); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == ""); - } - { - std::wstringstream ss; - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L""); - } - { - std::wstringstream ss(std::ios_base::in); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L""); - } -} diff --git a/libcxx/test/input.output/string.streams/stringstream.cons/move.pass.cpp b/libcxx/test/input.output/string.streams/stringstream.cons/move.pass.cpp deleted file mode 100644 index 4ae3aa6e84d..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream.cons/move.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream - -// basic_stringstream(basic_stringstream&& rhs); - -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::stringstream ss0(" 123 456 "); - std::stringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == "456 1236 "); - } - { - std::wstringstream ss0(L" 123 456 "); - std::wstringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == L"456 1236 "); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/string.streams/stringstream.cons/move2.pass.cpp b/libcxx/test/input.output/string.streams/stringstream.cons/move2.pass.cpp deleted file mode 100644 index 856cf3cbeaf..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream.cons/move2.pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream - -// basic_stringstream(basic_stringstream&& rhs); - -#include -#include -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - std::vector vecis; - vecis.push_back(std::istringstream()); - vecis.back().str("hub started at [00 6b 8b 45 69]"); - vecis.push_back(std::istringstream()); - vecis.back().str("hub started at [00 6b 8b 45 69]"); - for (int n = 0; n < vecis.size(); n++) - { - assert(vecis[n].str().size() == 31); - vecis[n].seekg(0, std::ios_base::beg); - assert(vecis[n].str().size() == 31); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/string.streams/stringstream.cons/string.pass.cpp b/libcxx/test/input.output/string.streams/stringstream.cons/string.pass.cpp deleted file mode 100644 index 3776f17f530..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream.cons/string.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream - -// explicit basic_stringstream(const basic_string& str, -// ios_base::openmode which = ios_base::out|ios_base::in); - -#include -#include - -int main() -{ - { - std::stringstream ss(" 123 456 "); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == "456 1236 "); - } - { - std::wstringstream ss(L" 123 456 "); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == L"456 1236 "); - } -} diff --git a/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp b/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp deleted file mode 100644 index 95599dd254e..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream - -// void swap(basic_stringstream& rhs); - -#include -#include - -int main() -{ - { - std::stringstream ss0(" 123 456 "); - std::stringstream ss; - ss.swap(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == "456 1236 "); - ss0 << i << ' ' << 123; - assert(ss0.str() == "456 123"); - } - { - std::wstringstream ss0(L" 123 456 "); - std::wstringstream ss; - ss.swap(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == L"456 1236 "); - ss0 << i << ' ' << 123; - assert(ss0.str() == L"456 123"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp b/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp deleted file mode 100644 index ccaf72d7e55..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream - -// basic_stringstream& operator=(basic_stringstream&& rhs); - -#include -#include - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::stringstream ss0(" 123 456 "); - std::stringstream ss; - ss = std::move(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == "456 1236 "); - } - { - std::wstringstream ss0(L" 123 456 "); - std::wstringstream ss; - ss = std::move(ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == L"456 1236 "); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp b/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp deleted file mode 100644 index 3ec11cd9e30..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream - -// template -// void -// swap(basic_stringstream& x, -// basic_stringstream& y); - -#include -#include - -int main() -{ - { - std::stringstream ss0(" 123 456 "); - std::stringstream ss; - swap(ss, ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == "456 1236 "); - ss0 << i << ' ' << 123; - assert(ss0.str() == "456 123"); - } - { - std::wstringstream ss0(L" 123 456 "); - std::wstringstream ss; - swap(ss, ss0); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == L"456 1236 "); - ss0 << i << ' ' << 123; - assert(ss0.str() == L"456 123"); - } -} diff --git a/libcxx/test/input.output/string.streams/stringstream.members/str.pass.cpp b/libcxx/test/input.output/string.streams/stringstream.members/str.pass.cpp deleted file mode 100644 index 155a262e19f..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream.members/str.pass.cpp +++ /dev/null @@ -1,62 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream - -// void str(const basic_string& str); - -#include -#include - -int main() -{ - { - std::stringstream ss(" 123 456 "); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == " 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == "456 1236 "); - ss.str("5466 89 "); - ss >> i; - assert(i == 5466); - ss >> i; - assert(i == 89); - ss << i << ' ' << 321; - assert(ss.str() == "89 3219 "); - } - { - std::wstringstream ss(L" 123 456 "); - assert(ss.rdbuf() != 0); - assert(ss.good()); - assert(ss.str() == L" 123 456 "); - int i = 0; - ss >> i; - assert(i == 123); - ss >> i; - assert(i == 456); - ss << i << ' ' << 123; - assert(ss.str() == L"456 1236 "); - ss.str(L"5466 89 "); - ss >> i; - assert(i == 5466); - ss >> i; - assert(i == 89); - ss << i << ' ' << 321; - assert(ss.str() == L"89 3219 "); - } -} diff --git a/libcxx/test/input.output/string.streams/stringstream/types.pass.cpp b/libcxx/test/input.output/string.streams/stringstream/types.pass.cpp deleted file mode 100644 index a89daa144e9..00000000000 --- a/libcxx/test/input.output/string.streams/stringstream/types.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template , class Allocator = allocator > -// class basic_stringstream -// : public basic_iostream -// { -// public: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; -// typedef Allocator allocator_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of, std::basic_stringstream >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::traits_type, std::char_traits >::value), ""); - static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); - static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); - static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); - static_assert((std::is_same::allocator_type, std::allocator >::value), ""); -} diff --git a/libcxx/test/input.output/string.streams/version.pass.cpp b/libcxx/test/input.output/string.streams/version.pass.cpp deleted file mode 100644 index 103897106d3..00000000000 --- a/libcxx/test/input.output/string.streams/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} -- cgit v1.2.3