mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Enhancement - Task::operator==
- Implemented Task::operator==. - Implemented unit tests.
This commit is contained in:
parent
a56eeb9ec2
commit
1cfe879409
3 changed files with 24 additions and 1 deletions
|
@ -32,7 +32,7 @@ Context context;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest test (34);
|
||||
UnitTest test (36);
|
||||
|
||||
test.is ((int)Task::textToStatus ("pending"), (int)Task::pending, "textToStatus pending");
|
||||
test.is ((int)Task::textToStatus ("completed"), (int)Task::completed, "textToStatus completed");
|
||||
|
@ -146,6 +146,13 @@ TODO Task::*Annotation*
|
|||
|
||||
*/
|
||||
|
||||
// Task::operator==
|
||||
Task left ("[one:1 two:2 three:3]");
|
||||
Task right (left);
|
||||
test.ok (left == right, "left == right -> true");
|
||||
left.set ("one", "1.0");
|
||||
test.notok (left == right, "left == right -> false");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue