Skip to content

Commit

Permalink
Docs: Remove superfluous parenthesis
Browse files Browse the repository at this point in the history
As per #549 from @larsxschneider
  • Loading branch information
Ernesto Jiménez authored and ernesto-jimenez committed Jan 31, 2018
1 parent 85c7900 commit 12b6f73
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion assert/assertion_format.go
Expand Up @@ -35,7 +35,7 @@ func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool {
// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
// the number of appearances of each of them in both lists should match.
//
// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted"))
// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")
func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool {
return ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...)
}
Expand Down
4 changes: 2 additions & 2 deletions assert/assertion_forward.go
Expand Up @@ -55,7 +55,7 @@ func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bo
// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
// the number of appearances of each of them in both lists should match.
//
// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]))
// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])
func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool {
return ElementsMatch(a.t, listA, listB, msgAndArgs...)
}
Expand All @@ -64,7 +64,7 @@ func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndA
// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
// the number of appearances of each of them in both lists should match.
//
// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted"))
// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")
func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool {
return ElementsMatchf(a.t, listA, listB, msg, args...)
}
Expand Down
2 changes: 1 addition & 1 deletion assert/assertions.go
Expand Up @@ -711,7 +711,7 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{})
// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
// the number of appearances of each of them in both lists should match.
//
// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]))
// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2])
func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) {
if isEmpty(listA) && isEmpty(listB) {
return true
Expand Down
4 changes: 2 additions & 2 deletions require/require.go
Expand Up @@ -68,7 +68,7 @@ func DirExistsf(t TestingT, path string, msg string, args ...interface{}) {
// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
// the number of appearances of each of them in both lists should match.
//
// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]))
// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2])
func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) {
if !assert.ElementsMatch(t, listA, listB, msgAndArgs...) {
t.FailNow()
Expand All @@ -79,7 +79,7 @@ func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs
// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
// the number of appearances of each of them in both lists should match.
//
// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted"))
// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")
func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) {
if !assert.ElementsMatchf(t, listA, listB, msg, args...) {
t.FailNow()
Expand Down
4 changes: 2 additions & 2 deletions require/require_forward.go
Expand Up @@ -56,7 +56,7 @@ func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) {
// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
// the number of appearances of each of them in both lists should match.
//
// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]))
// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])
func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) {
ElementsMatch(a.t, listA, listB, msgAndArgs...)
}
Expand All @@ -65,7 +65,7 @@ func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndA
// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
// the number of appearances of each of them in both lists should match.
//
// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted"))
// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")
func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) {
ElementsMatchf(a.t, listA, listB, msg, args...)
}
Expand Down

0 comments on commit 12b6f73

Please sign in to comment.