Skip to content

Commit

Permalink
Update TestCommandIgnoreFlagsIncludingFirstArgument to test for argum…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
jszwedko committed Oct 30, 2015
1 parent 6191d93 commit 8cd49b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func TestCommandIgnoreFlagsIncludingFirstArgument(t *testing.T) {
SkipFlagParsing: true,
}
err := command.Run(c)

expect(t, err, nil)

expect(t, []string(c.Args()), []string{"blah", "-break"})
}
4 changes: 2 additions & 2 deletions helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (

/* Test Helpers */
func expect(t *testing.T, a interface{}, b interface{}) {
if a != b {
if !reflect.DeepEqual(a, b) {
t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
}
}

func refute(t *testing.T, a interface{}, b interface{}) {
if a == b {
if reflect.DeepEqual(a, b) {
t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
}
}

0 comments on commit 8cd49b1

Please sign in to comment.