summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/raw_pwrite_stream_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/raw_pwrite_stream_test.cpp')
-rw-r--r--llvm/unittests/Support/raw_pwrite_stream_test.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/unittests/Support/raw_pwrite_stream_test.cpp b/llvm/unittests/Support/raw_pwrite_stream_test.cpp
index bcbb29b86bd..2792f44b605 100644
--- a/llvm/unittests/Support/raw_pwrite_stream_test.cpp
+++ b/llvm/unittests/Support/raw_pwrite_stream_test.cpp
@@ -16,10 +16,18 @@ using namespace llvm;
namespace {
TEST(raw_pwrite_ostreamTest, TestSVector) {
- SmallString<64> Buffer;
+ SmallVector<char, 0> Buffer;
raw_svector_ostream OS(Buffer);
+ OS << "abcd";
StringRef Test = "test";
OS.pwrite(Test.data(), Test.size(), 0);
EXPECT_EQ(Test, OS.str());
+
+#ifdef GTEST_HAS_DEATH_TEST
+#ifndef NDEBUG
+ EXPECT_DEATH(OS.pwrite("12345", 5, 0),
+ "We don't support extending the stream");
+#endif
+#endif
}
}
OpenPOWER on IntegriCloud