diff options
Diffstat (limited to 'unittests/Support/raw_pwrite_stream_test.cpp')
-rw-r--r-- | unittests/Support/raw_pwrite_stream_test.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/unittests/Support/raw_pwrite_stream_test.cpp b/unittests/Support/raw_pwrite_stream_test.cpp new file mode 100644 index 0000000..bcbb29b --- /dev/null +++ b/unittests/Support/raw_pwrite_stream_test.cpp @@ -0,0 +1,25 @@ +//===- raw_pwrite_stream_test.cpp - raw_pwrite_stream tests ---------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "gtest/gtest.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/Support/raw_ostream.h" + +using namespace llvm; + +namespace { + +TEST(raw_pwrite_ostreamTest, TestSVector) { + SmallString<64> Buffer; + raw_svector_ostream OS(Buffer); + StringRef Test = "test"; + OS.pwrite(Test.data(), Test.size(), 0); + EXPECT_EQ(Test, OS.str()); +} +} |