Skip to content

Commit

Permalink
Update README showing test.Err (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
FollowTheProcess authored Aug 15, 2023
1 parent 52b38de commit 8e9bb45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func TestSomething(t *testing.T) {

err := doSomething()
test.Ok(t, err) // Fails if err != nil
test.Err(t, err) // Fails if err == nil

test.True(t, true) // Passes
test.False(t, true) // Fails
Expand Down
1 change: 1 addition & 0 deletions test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func TestFail(t *testing.T) {
}
}

// All functions that should fail their test TB
failFns := []func(tb testing.TB){
func(tb testing.TB) { test.Equal(tb, "something", "else") },
func(tb testing.TB) { test.Equal(tb, 42, 27) },
Expand Down

0 comments on commit 8e9bb45

Please sign in to comment.