Unit Tests

- Added a non-trivial JSON task to parse.
This commit is contained in:
Paul Beckingham 2013-05-20 16:35:42 -04:00
parent b408458439
commit 222cd9a8d7

View file

@ -35,13 +35,18 @@ Context context;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int main (int argc, char** argv) int main (int argc, char** argv)
{ {
UnitTest t (1); UnitTest t (2);
bool good = true; bool good = true;
try {Task t_ff1 ("{}");} try {Task t1 ("{}");}
catch (const std::string& e){t.diag (e); good = false;} catch (const std::string& e){t.diag (e); good = false;}
t.ok (good, "Task::Task ('{}')"); t.ok (good, "Task::Task ('{}')");
good = true;
try {Task t2 ("{\"uuid\":\"00000000-0000-0000-000000000001\",\"description\":\"foo\",\"entry\":1234567890}");}
catch (const std::string& e){t.diag (e); good = false;}
t.ok (good, "Task::Task ('{<minimal>}')");
return 0; return 0;
} }