test/test_util.cc
changeset 2282 eed4a7047201
parent 1812 925ad845e3ec
child 2444 a97dd32908e5
     1.1 --- a/test/test_util.cc	Wed Nov 08 12:55:17 2017 +0100
     1.2 +++ b/test/test_util.cc	Thu Nov 09 11:33:42 2017 +0100
     1.3 @@ -18,6 +18,19 @@
     1.4  	return sstr.str();
     1.5  }
     1.6  
     1.7 +void dump_out(const char* filename, const char* outdata)
     1.8 +{
     1.9 +	std::ofstream outfile(filename);
    1.10 +	if(!outfile)
    1.11 +	{
    1.12 +		throw std::runtime_error("Cannot open output file!");
    1.13 +	}
    1.14 +	
    1.15 +	outfile << outdata;
    1.16 +    outfile.close();
    1.17 +}
    1.18 +
    1.19 +
    1.20  const char* tl_status_string(PEP_STATUS status) {
    1.21      switch (status) {
    1.22          case PEP_STATUS_OK: