By adding one more assertion function "That", which took t, an object, and a Matcher, you could support hamcrest-style matching and extension of the assertions without need for PRs in this repo.
"hamcrest-style" would translate to something like the following in go:
assert.That(t, 123, is.GreaterThanInt(99))
You could make Matcher the same way as the hamcrest java matcher, or fit it to be more go-like, but the gist is the same, that hamcrest style can provide readable test-DSL, descriptive error messages, and customer-extensibility of new assertions.
By adding one more assertion function "That", which took
t, an object, and a Matcher
, you could support hamcrest-style matching and extension of the assertions without need for PRs in this repo."hamcrest-style" would translate to something like the following in go:
You could make
Matcher
the same way as the hamcrest java matcher, or fit it to be more go-like, but the gist is the same, that hamcrest style can provide readable test-DSL, descriptive error messages, and customer-extensibility of new assertions./cc @davedevelopment