mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Add raw_pwrite_stream type.
This is a raw_ostream that also supports pwrite. I will be used in a sec. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234895 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
25
unittests/Support/raw_pwrite_stream_test.cpp
Normal file
25
unittests/Support/raw_pwrite_stream_test.cpp
Normal file
@@ -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());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user