proxygen
LogStreamTest.cpp File Reference

Go to the source code of this file.

Functions

 TEST (LogStream, simple)
 
 TEST (LogStream, largeMessage)
 

Function Documentation

TEST ( LogStream  ,
simple   
)

Definition at line 21 of file LogStreamTest.cpp.

References EXPECT_EQ.

21  {
22  LogStream ls{nullptr};
23  ls << "test";
24  ls << " foobar";
25 
26  EXPECT_EQ("test foobar", ls.extractString());
27 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
TEST ( LogStream  ,
largeMessage   
)

Definition at line 29 of file LogStreamTest.cpp.

References EXPECT_EQ, and string.

29  {
30  std::string largeString(4096, 'a');
31 
32  LogStream ls{nullptr};
33  ls << "prefix ";
34  ls << largeString;
35  ls << " suffix";
36 
37  EXPECT_EQ("prefix " + largeString + " suffix", ls.extractString());
38 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
const char * string
Definition: Conv.cpp:212