Electroneum
ostreamwrappertest.cpp File Reference
#include "unittest.h"
#include "rapidjson/ostreamwrapper.h"
#include "rapidjson/encodedstream.h"
#include "rapidjson/document.h"
#include <sstream>
#include <fstream>
Include dependency graph for ostreamwrappertest.cpp:

Go to the source code of this file.

Functions

 TEST (OStreamWrapper, ostringstream)
 
 TEST (OStreamWrapper, stringstream)
 
 TEST (OStreamWrapper, wostringstream)
 
 TEST (OStreamWrapper, wstringstream)
 
 TEST (OStreamWrapper, cout)
 
 TEST (OStreamWrapper, ofstream)
 
 TEST (OStreamWrapper, fstream)
 

Function Documentation

◆ TEST() [1/7]

TEST ( OStreamWrapper  ,
ostringstream   
)

Definition at line 40 of file ostreamwrappertest.cpp.

40  {
41  TestStringStream<ostringstream>();
42 }

◆ TEST() [2/7]

TEST ( OStreamWrapper  ,
stringstream   
)

Definition at line 44 of file ostreamwrappertest.cpp.

44  {
45  TestStringStream<stringstream>();
46 }

◆ TEST() [3/7]

TEST ( OStreamWrapper  ,
wostringstream   
)

Definition at line 48 of file ostreamwrappertest.cpp.

48  {
49  TestStringStream<wostringstream>();
50 }

◆ TEST() [4/7]

TEST ( OStreamWrapper  ,
wstringstream   
)

Definition at line 52 of file ostreamwrappertest.cpp.

52  {
53  TestStringStream<wstringstream>();
54 }

◆ TEST() [5/7]

TEST ( OStreamWrapper  ,
cout   
)

Definition at line 56 of file ostreamwrappertest.cpp.

56  {
57  OStreamWrapper os(cout);
58  const char* s = "Hello World!\n";
59  while (*s)
60  os.Put(*s++);
61  os.Flush();
62 }
Here is the call graph for this function:

◆ TEST() [6/7]

TEST ( OStreamWrapper  ,
ofstream   
)

Definition at line 86 of file ostreamwrappertest.cpp.

86  {
87  TestFileStream<ofstream>();
88 }

◆ TEST() [7/7]

TEST ( OStreamWrapper  ,
fstream   
)

Definition at line 90 of file ostreamwrappertest.cpp.

90  {
91  TestFileStream<fstream>();
92 }