mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Replace direct Task.data access with a temp getter (syntactic refactor)
Now this getter, `data_removeme`, can easily be grepped out and replaced, one usage at a time in small PRs.
This commit is contained in:
parent
3a00956144
commit
dede40bc4e
10 changed files with 29 additions and 26 deletions
|
@ -187,7 +187,7 @@ TODO Task::decode
|
|||
test.is (task.get ("three"), "four", "three=four");
|
||||
|
||||
// Task::set
|
||||
task.data.clear ();
|
||||
task = Task();
|
||||
task.set ("name", "value");
|
||||
test.is (task.composeF4 (), "[name:\"value\"]", "Task::set");
|
||||
|
||||
|
@ -211,7 +211,7 @@ TODO Task::decode
|
|||
test.is (task.composeF4 (), "[name:\"value\"]", "Task::remove");
|
||||
|
||||
// Task::all
|
||||
test.is (task.data.size (), (size_t)1, "Task::all size");
|
||||
test.is (task.data_removeme ().size (), (size_t)1, "Task::all size");
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ int main (int, char**)
|
|||
Task rightAgain (right);
|
||||
|
||||
std::string output = left.diff (right);
|
||||
t.ok (left.data != right.data, "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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue