Danny Robson
f6056153e3
This places, at long last, the core library code into the same namespace as the extended library code.
18 lines
549 B
C++
18 lines
549 B
C++
#include "parse.hpp"
|
|
#include "tap.hpp"
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
int
|
|
main (void)
|
|
{
|
|
cruft::TAP::logger tap;
|
|
|
|
tap.expect_eq (cruft::parse<long> ("1"), 1L, "parsing long '1'");
|
|
tap.expect_throw<std::invalid_argument> ([] () { cruft::parse<long> ("a"); }, "parsing long 'a'");
|
|
|
|
tap.expect_eq (cruft::parse<float> ("1"), 1.f, "parsing float '1'");
|
|
tap.expect_throw<std::invalid_argument> ([] () { cruft::parse<float> ("a"); }, "parsing float 'a'");
|
|
|
|
return tap.status ();
|
|
} |