Tests: Fixed test that will no longer compile

This commit is contained in:
Paul Beckingham 2015-09-05 17:23:48 -04:00
parent ab40fae67e
commit 3765aacc73

View file

@ -36,7 +36,7 @@ Context context;
////////////////////////////////////////////////////////////////////////////////
int main (int argc, char** argv)
{
UnitTest t (23);
UnitTest t (22);
// Ensure environment has no influence.
unsetenv ("TASKDATA");
@ -65,7 +65,6 @@ int main (int argc, char** argv)
// TODO const std::string uuid ();
// TODO These are in feedback.cpp, not util.cpp.
// std::string taskDiff (const Task&, const Task&);
Task left;
left.set ("zero", "0");
left.set ("one", 1);
@ -79,13 +78,12 @@ int main (int argc, char** argv)
Task rightAgain (right);
std::string output = taskDifferences (left, right);
t.ok (taskDiff (left, right), "Detected changes");
t.ok (left != right, "Detected changes");
t.ok (output.find ("Zero will be changed from '0' to '00'") != std::string::npos, "Detected change zero:0 -> zero:00");
t.ok (output.find ("One will be deleted") != std::string::npos, "Detected deletion one:1 ->");
t.ok (output.find ("Two") == std::string::npos, "Detected no change two:2 -> two:2");
t.ok (output.find ("Three will be set to '3'") != std::string::npos, "Detected addition -> three:3");
t.notok (taskDiff (right, rightAgain), "No changes detected");
output = taskDifferences (right, rightAgain);
t.ok (output.find ("No changes will be made") != std::string::npos, "No changes detected");