5 #pragma clang diagnostic push 6 #pragma clang diagnostic ignored "-Wformat-security" 10 template<
typename... Targs>
14 snprintf(refstr, 1024, fmt.c_str(), args...);
18 std::cout <<
"Format string: " << fmt <<
"\n";
19 std::cout <<
" Reference output: " << refstr <<
"\n";
20 std::cout <<
" BPPrint output: " << bpstr <<
"\n";
22 if(std::string(refstr) != bpstr)
23 throw std::runtime_error(
"!!!!! MISMATCHED OUTPUT !!!!!\n");
26 template<
typename... Targs>
38 for(
unsigned int i = 250; i < 260; i++)
64 catch(std::exception & ex)
66 std::cout <<
"Test failed: " << ex.what() <<
"\n";
std::string format_string(const std::string &str, Targs...args)
void test_format(const std::string &fmt, Targs &&...args)
void test_string(const std::string &fmt, Targs...args)