summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-06-01 20:02:59 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-06-01 20:02:59 +0000
commit0bc272cf9a27a9fe15305df77df3d58edb3bd5f6 (patch)
tree29c3331a2158b586e441dc4d5cb8049c9073f20a
parent879ca9d47d509471af3012b6d32f70757f5e7d4c (diff)
downloadbcm5719-llvm-0bc272cf9a27a9fe15305df77df3d58edb3bd5f6.tar.gz
bcm5719-llvm-0bc272cf9a27a9fe15305df77df3d58edb3bd5f6.zip
Fix a few testsuite bugs involving trailing null (or lack thereof) in strstream.
llvm-svn: 157832
-rw-r--r--libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp4
-rw-r--r--libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp2
-rw-r--r--libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp2
-rw-r--r--libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp4
-rw-r--r--libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp b/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp
index 39b4f79f6ab..1ad0bfa8e26 100644
--- a/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp
+++ b/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp
@@ -25,7 +25,7 @@ int main()
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 main()
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"));
}
}
diff --git a/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp b/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp
index 2847396b0c6..78343f83886 100644
--- a/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp
+++ b/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp
@@ -22,6 +22,6 @@ int main()
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"));
}
diff --git a/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp b/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp
index e0f8d378d94..9a5542a63ad 100644
--- a/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp
+++ b/libcxx/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp
@@ -20,7 +20,7 @@ int main()
{
{
std::ostrstream out;
- out << 123 << ' ' << 4.5 << ' ' << "dog";
+ out << 123 << ' ' << 4.5 << ' ' << "dog" << std::ends;
assert(out.str() == std::string("123 4.5 dog"));
}
}
diff --git a/libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp b/libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp
index 7133c3286ea..374f430fd81 100644
--- a/libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp
+++ b/libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp
@@ -22,7 +22,7 @@ int main()
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 @@ int main()
inout >> i >> d >> s;
assert(i == 123);
assert(d == 4.5);
- assert(s == "dog");
+ assert(strcmp(s.c_str(), "dog") == 0);
}
diff --git a/libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp b/libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp
index db90e96c635..4ac1c44ee28 100644
--- a/libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp
+++ b/libcxx/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp
@@ -20,7 +20,7 @@ int main()
{
{
std::strstream out;
- out << 123 << ' ' << 4.5 << ' ' << "dog";
+ out << 123 << ' ' << 4.5 << ' ' << "dog" << std::ends;
assert(out.str() == std::string("123 4.5 dog"));
}
}
OpenPOWER on IntegriCloud