Skip to content

Commit

Permalink
fix AnyOf.Test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamluzsi committed Oct 25, 2023
1 parent dc2e612 commit 1f01e36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assert/AnyOf.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (ao *A) Case(blk func(t It)) {
// Test is an alias for A.Case
func (ao *A) Test(blk func(t It)) {
ao.TB.Helper()
ao.Test(blk)
ao.Case(blk)
}

// Finish will check if any of the assertion succeeded.
Expand Down
11 changes: 11 additions & 0 deletions assert/AnyOf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,14 @@ func TestOneOf(t *testing.T) {
})
})
}

func TestA_Test_smoke(t *testing.T) {
assert.AnyOf(t, func(a *assert.A) {
a.Test(func(t assert.It) {
t.Must.False(true)
})
a.Test(func(t assert.It) {
t.Must.True(true)
})
})
}

0 comments on commit 1f01e36

Please sign in to comment.