Skip to content

Commit

Permalink
small clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcorby-eaglen authored and corbym committed Apr 11, 2023
1 parent 4c0d6d6 commit 70882ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions has/hasstructvalues.go
Expand Up @@ -13,8 +13,8 @@ type StructMatchers[A any] map[string]*gocrest.Matcher[A]
// This method can be used to check single struct fields in different ways or omit checking some struct fields at all.
// Will automatically de-reference pointers.
// Panics if the actual value is not a struct.
// Panics if Structmatchers contains a key that can not be found in the actual struct.
// Panics if Structmatchers contains a key that is unexported.
// Panics if StructMatchers contains a key that can not be found in the actual struct.
// Panics if StructMatchers contains a key that is unexported.
func StructWithValues[A any, B any](expects StructMatchers[B]) *gocrest.Matcher[A] {
match := new(gocrest.Matcher[A])
match.Describe = fmt.Sprintf("struct values to match {%s}", describeStructMatchers(expects))
Expand Down
2 changes: 1 addition & 1 deletion is/contains.go
Expand Up @@ -7,7 +7,7 @@ import (
)

// StringContaining finds if all x's are contained as value in y.
// Acts like "ContainsAll", all elements given must be present (or must match) in actual in the same order as the expected values.
// Acts like "ContainsAll", all elements given must be present.
func StringContaining(expected ...string) *gocrest.Matcher[string] {
match := new(gocrest.Matcher[string])
match.Describe = fmt.Sprintf("something that contains %v", expected)
Expand Down
2 changes: 1 addition & 1 deletion matcher_test.go
Expand Up @@ -1160,7 +1160,7 @@ func TestCallingFunctionEventually(t *testing.T) {
return a
}
then.WithinFiveSeconds(t, func(eventually gocrest.TestingT) {
then.AssertThat(eventually, by.Calling[string, string](function, "hi"), is.EqualTo("hi"))
then.AssertThat(eventually, by.Calling(function, "hi"), is.EqualTo("hi"))
})
}
func firstTestChannel() chan int {
Expand Down

0 comments on commit 70882ef

Please sign in to comment.