#include "parse.hpp" #include "tap.hpp" /////////////////////////////////////////////////////////////////////////////// int main (void) { util::TAP::logger tap; tap.expect_eq (util::parse ("1"), 1L, "parsing long '1'"); tap.expect_throw ([] () { util::parse ("a"); }, "parsing long 'a'"); tap.expect_eq (util::parse ("1"), 1.f, "parsing float '1'"); tap.expect_throw ([] () { util::parse ("a"); }, "parsing float 'a'"); return tap.status (); }