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