mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-22 20:23:09 +02:00
Unit Tests
- Added a non-trivial JSON task to parse.
This commit is contained in:
parent
b408458439
commit
222cd9a8d7
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue