MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / setup

Method setup

extern/boost/boost/test/unit_test_parameters.hpp:107–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 }
106
107 void setup( const const_string& stream_name,
108 boost::function<void ()> const &cleaner_callback = boost::function<void ()>() )
109 {
110 if(stream_name.empty())
111 return;
112
113 if( stream_name == "stderr" ) {
114 m_stream = &std::cerr;
115 if(cleaner_callback) {
116 m_cleaner = boost::make_shared<callback_cleaner>(cleaner_callback);
117 }
118 else {
119 m_cleaner.reset();
120 }
121 }
122 else if( stream_name == "stdout" ) {
123 m_stream = &std::cout;
124 if (cleaner_callback) {
125 m_cleaner = boost::make_shared<callback_cleaner>(cleaner_callback);
126 }
127 else {
128 m_cleaner.reset();
129 }
130 }
131 else {
132 m_cleaner = boost::make_shared<callback_cleaner>(cleaner_callback);
133 m_cleaner->m_file.open( std::string(stream_name.begin(), stream_name.end()).c_str() );
134 m_stream = &m_cleaner->m_file;
135 }
136 }
137
138 // Access methods
139 std::ostream& ref() const { return *m_stream; }

Callers 15

chc_initFunction · 0.45
chc_compressFunction · 0.45
ccm_initFunction · 0.45
ccm_testFunction · 0.45
ccm_memoryFunction · 0.45
gcm_initFunction · 0.45
ocb_initFunction · 0.45
ocb3_initFunction · 0.45
omac_initFunction · 0.45
xcbc_initFunction · 0.45
f9_initFunction · 0.45
f9_doneFunction · 0.45

Calls 6

emptyMethod · 0.45
resetMethod · 0.45
openMethod · 0.45
c_strMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected