Ready for new release, v1.2
This commit is contained in:
parent
a0e8e1801d
commit
e29d17784e
@ -42,10 +42,7 @@ go-todotxt requires Go1.1 or higher.
|
|||||||
|
|
||||||
// Filter list to get only completed tasks
|
// Filter list to get only completed tasks
|
||||||
completedList := testTasklist.Filter(func(t Task) bool {
|
completedList := testTasklist.Filter(func(t Task) bool {
|
||||||
if t.Completed {
|
return t.Completed
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
})
|
})
|
||||||
fmt.Print(completedList)
|
fmt.Print(completedList)
|
||||||
}
|
}
|
||||||
|
@ -422,12 +422,7 @@ func TestTaskListFilter(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter list to get only completed tasks
|
// Filter list to get only completed tasks
|
||||||
completedList := testTasklist.Filter(func(t Task) bool {
|
completedList := testTasklist.Filter(func(t Task) bool { return t.Completed })
|
||||||
if t.Completed {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
})
|
|
||||||
testExpected = 33
|
testExpected = 33
|
||||||
testGot = len(*completedList)
|
testGot = len(*completedList)
|
||||||
if testGot != testExpected {
|
if testGot != testExpected {
|
||||||
@ -435,12 +430,7 @@ func TestTaskListFilter(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter list to get only tasks with a due date
|
// Filter list to get only tasks with a due date
|
||||||
dueDateList := testTasklist.Filter(func(t Task) bool {
|
dueDateList := testTasklist.Filter(func(t Task) bool { return t.HasDueDate() })
|
||||||
if t.HasDueDate() {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
})
|
|
||||||
testExpected = 26
|
testExpected = 26
|
||||||
testGot = len(*dueDateList)
|
testGot = len(*dueDateList)
|
||||||
if testGot != testExpected {
|
if testGot != testExpected {
|
||||||
@ -449,10 +439,7 @@ func TestTaskListFilter(t *testing.T) {
|
|||||||
|
|
||||||
// Filter list to get only tasks with "B" priority
|
// Filter list to get only tasks with "B" priority
|
||||||
prioBList := testTasklist.Filter(func(t Task) bool {
|
prioBList := testTasklist.Filter(func(t Task) bool {
|
||||||
if t.HasPriority() && t.Priority == "B" {
|
return t.HasPriority() && t.Priority == "B"
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
})
|
})
|
||||||
testExpected = 17
|
testExpected = 17
|
||||||
testGot = len(*prioBList)
|
testGot = len(*prioBList)
|
||||||
|
Loading…
Reference in New Issue
Block a user