1 //===- llvm/unittest/Support/formatted_raw_ostream_test.cpp ---------------===//
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 "llvm/ADT/SmallString.h"
11 #include "llvm/Support/FormattedStream.h"
12 #include "llvm/Support/raw_ostream.h"
13 #include "gtest/gtest.h"
19 TEST(formatted_raw_ostreamTest
, Test_Tell
) {
20 // Check offset when underlying stream has buffer contents.
22 raw_svector_ostream
B(A
);
23 formatted_raw_ostream
C(B
);
26 for (unsigned i
= 0; i
!= 3; ++i
) {
29 EXPECT_EQ(100*(i
+1), (unsigned) C
.tell());