(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestNewToDo(t *testing.T) { |
| 23 | collection := lege.NewCollection(lege.Location{}, lege.Location{}, lege.Boundary{}, "TODO Hello World") |
| 24 | comment := comments.Comment{ |
| 25 | Collection: *collection, |
| 26 | } |
| 27 | todo := NewToDo(comment) |
| 28 | |
| 29 | if todo == nil { |
| 30 | t.Fatalf("expected a TODO, got: %v", todo) |
| 31 | } |
| 32 | |
| 33 | if todo.Phrase != "TODO" { |
| 34 | t.Fatalf("expected matched phrase to be TODO, got: %s", todo.Phrase) |
| 35 | } |
| 36 | } |