diff --git a/test/string.cpp b/test/string.cpp index 6f663813..2bd68ba8 100644 --- a/test/string.cpp +++ b/test/string.cpp @@ -5,11 +5,11 @@ #include -int -main (int, char**) -{ - cruft::TAP::logger tap; +/////////////////////////////////////////////////////////////////////////////// +void +test_tokeniser (cruft::TAP::logger &tap) +{ // the string_literal prefix is required to (easily) construct a string // with an internal null character. using namespace std::literals::string_literals; @@ -33,6 +33,16 @@ main (int, char**) for (auto [tok, expected]: cruft::zip (cruft::tokeniser (src, ','), TESTS)) { tap.expect (equal (tok, expected.value), "%s", expected.message); } +} + + +/////////////////////////////////////////////////////////////////////////////// +int +main (int, char**) +{ + cruft::TAP::logger tap; + + test_tokeniser (tap); return tap.status (); } \ No newline at end of file