1 //===- raw_pwrite_stream_test.cpp - raw_pwrite_stream tests ---------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "gtest/gtest.h"
11 #include "llvm/ADT/SmallString.h"
12 #include "llvm/Support/raw_ostream.h"
18 TEST(raw_pwrite_ostreamTest, TestSVector) {
19 SmallString<64> Buffer;
20 raw_svector_ostream OS(Buffer);
21 StringRef Test = "test";
22 OS.pwrite(Test.data(), Test.size(), 0);
23 EXPECT_EQ(Test, OS.str());