#include "format.hpp" #include "tap.hpp" int main (void) { using namespace std::string_literals; util::TAP::logger tap; tap.expect_eq (util::format::render ("identity"), "identity"s, "identity literal"); tap.expect_eq (util::format::render ("%s", "identity"s), "identity"s, "identity substitution"); tap.expect_throw ([] (void) { util::format::render ("%s"); }); tap.expect_throw ([] (void) { util::format::render ("%!", 42); }); tap.expect_throw ([] (void) { util::format::render ("%", 42); }); return tap.status (); }