aboutsummaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-15 20:31:46 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-15 20:31:46 +0000
commitc8213b782735c7916cbc996c8dcdf89f9593d354 (patch)
treed2ef357d41d00a2c3b72d344552e17bab3358355 /unittests
parentd1c990ff67d00c02fe39fef857c2581cc41ad1f1 (diff)
downloadexternal_llvm-c8213b782735c7916cbc996c8dcdf89f9593d354.zip
external_llvm-c8213b782735c7916cbc996c8dcdf89f9593d354.tar.gz
external_llvm-c8213b782735c7916cbc996c8dcdf89f9593d354.tar.bz2
Drop the raw_ostream required buffer size to 1.
- As best I can tell, we have eliminated all the code which used to require a larger buffer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/raw_ostream_test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/unittests/Support/raw_ostream_test.cpp b/unittests/Support/raw_ostream_test.cpp
index 52639ba..bd2e95c 100644
--- a/unittests/Support/raw_ostream_test.cpp
+++ b/unittests/Support/raw_ostream_test.cpp
@@ -117,4 +117,14 @@ TEST(raw_ostreamTest, BufferEdge) {
EXPECT_EQ("1.20", printToString(format("%.2f", 1.2), 10));
}
+TEST(raw_ostreamTest, TinyBuffer) {
+ std::string Str;
+ raw_string_ostream OS(Str);
+ OS.SetBufferSize(1);
+ OS << "hello";
+ OS << 1;
+ OS << 'w' << 'o' << 'r' << 'l' << 'd';
+ EXPECT_EQ("hello1world", OS.str());
+}
+
}