summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2019-07-01 16:20:25 +0000
committerMarshall Clow <mclow.lists@gmail.com>2019-07-01 16:20:25 +0000
commit3c125fe821cc0306dbe9820595a06e8b5e502a2c (patch)
treeea1ffcf36702654309436e1a86fd6ef9520c86fa /libcxx/test/std
parent62d64b0c30880ed2d3623cc78c8daedb6ba0e6b7 (diff)
downloadbcm5719-llvm-3c125fe821cc0306dbe9820595a06e8b5e502a2c.tar.gz
bcm5719-llvm-3c125fe821cc0306dbe9820595a06e8b5e502a2c.zip
Implement LWG2221: 'Formatted output for nullptr_t' Reviewed as: https://reviews.llvm.org/D63053
llvm-svn: 364802
Diffstat (limited to 'libcxx/test/std')
-rw-r--r--libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp
index daf5ba102a8..af411157e9c 100644
--- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp
@@ -67,6 +67,13 @@ int main(int, char**)
os << &sb2;
assert(sb.str() == "testing...");
}
+ { // LWG 2221 - nullptr
+ testbuf<char> sb;
+ std::ostream os(&sb);
+ os << nullptr;
+ assert(sb.str().size() != 0);
+ LIBCPP_ASSERT(sb.str() == "nullptr");
+ }
return 0;
}
OpenPOWER on IntegriCloud