[cfe-commits] [libcxx] r157832 - in /libcxx/trunk/test/depr/depr.str.strstreams: depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp depr.ostrstream/depr.ostrstream.cons/default.pass.cpp depr.ostrstream/depr.ostrstream.members/str.pass.cpp depr.strstream/depr.strstream.cons/default.pass.cpp depr.strstream/depr.strstream.oper/str.pass.cpp
Howard Hinnant
hhinnant at apple.com
Fri Jun 1 13:02:59 PDT 2012
Author: hhinnant
Date: Fri Jun 1 15:02:59 2012
New Revision: 157832
URL: http://llvm.org/viewvc/llvm-project?rev=157832&view=rev
Log:
Fix a few testsuite bugs involving trailing null (or lack thereof) in strstream.
Modified:
libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp
libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp
libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp
libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp
libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp
Modified: libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp?rev=157832&r1=157831&r2=157832&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp Fri Jun 1 15:02:59 2012
@@ -25,7 +25,7 @@
int i = 321;
double d = 5.5;
std::string s("cat");
- out << i << ' ' << d << ' ' << s;
+ out << i << ' ' << d << ' ' << s << std::ends;
assert(out.str() == std::string("321 5.5 cat"));
}
{
@@ -35,7 +35,7 @@
int i = 321;
double d = 5.5;
std::string s("cat");
- out << i << ' ' << d << ' ' << s;
+ out << i << ' ' << d << ' ' << s << std::ends;
assert(out.str() == std::string("123 4.5 dog321 5.5 cat"));
}
}
Modified: libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp?rev=157832&r1=157831&r2=157832&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp Fri Jun 1 15:02:59 2012
@@ -22,6 +22,6 @@
int i = 123;
double d = 4.5;
std::string s("dog");
- out << i << ' ' << d << ' ' << s;
+ out << i << ' ' << d << ' ' << s << std::ends;
assert(out.str() == std::string("123 4.5 dog"));
}
Modified: libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp?rev=157832&r1=157831&r2=157832&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp Fri Jun 1 15:02:59 2012
@@ -20,7 +20,7 @@
{
{
std::ostrstream out;
- out << 123 << ' ' << 4.5 << ' ' << "dog";
+ out << 123 << ' ' << 4.5 << ' ' << "dog" << std::ends;
assert(out.str() == std::string("123 4.5 dog"));
}
}
Modified: libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp?rev=157832&r1=157831&r2=157832&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp Fri Jun 1 15:02:59 2012
@@ -22,7 +22,7 @@
int i = 123;
double d = 4.5;
std::string s("dog");
- inout << i << ' ' << d << ' ' << s;
+ inout << i << ' ' << d << ' ' << s << std::ends;
assert(inout.str() == std::string("123 4.5 dog"));
i = 0;
d = 0;
@@ -30,5 +30,5 @@
inout >> i >> d >> s;
assert(i == 123);
assert(d == 4.5);
- assert(s == "dog");
+ assert(strcmp(s.c_str(), "dog") == 0);
}
Modified: libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp?rev=157832&r1=157831&r2=157832&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp Fri Jun 1 15:02:59 2012
@@ -20,7 +20,7 @@
{
{
std::strstream out;
- out << 123 << ' ' << 4.5 << ' ' << "dog";
+ out << 123 << ' ' << 4.5 << ' ' << "dog" << std::ends;
assert(out.str() == std::string("123 4.5 dog"));
}
}
More information about the cfe-commits
mailing list