| 15 | namespace bhad = boost::histogram::axis::detail; |
| 16 | |
| 17 | int main() { |
| 18 | // escape0 |
| 19 | { |
| 20 | std::ostringstream os; |
| 21 | bhad::escape_string(os, std::string("abc")); |
| 22 | BOOST_TEST_EQ(os.str(), std::string("'abc'")); |
| 23 | } |
| 24 | |
| 25 | // escape1 |
| 26 | { |
| 27 | std::ostringstream os; |
| 28 | bhad::escape_string(os, std::string("abc\n")); |
| 29 | BOOST_TEST_EQ(os.str(), std::string("'abc\n'")); |
| 30 | } |
| 31 | |
| 32 | // escape2 |
| 33 | { |
| 34 | std::ostringstream os; |
| 35 | bhad::escape_string(os, std::string("'abc'")); |
| 36 | BOOST_TEST_EQ(os.str(), std::string("'\\\'abc\\\''")); |
| 37 | } |
| 38 | |
| 39 | // cat |
| 40 | { BOOST_TEST_EQ(bhd::cat("foo", 1, "bar"), std::string("foo1bar")); } |
| 41 | |
| 42 | return boost::report_errors(); |
| 43 | } |
nothing calls this directly
no test coverage detected