Skip to content

Commit 3f28143

Browse files
committed
Remove ineffective inline code blocks
Godoc does not have inline code blocks. Look to the standaed library for conventions for inline references to code.
1 parent a0ac157 commit 3f28143

File tree

9 files changed

+56
-52
lines changed

9 files changed

+56
-52
lines changed

assert/assertion_format.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assert/assertion_forward.go

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assert/assertions.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
16301630
Errors
16311631
*/
16321632

1633-
// NoError asserts that a function returned no error (i.e. `nil`).
1633+
// NoError asserts that a function returned a nil error (ie. no error).
16341634
//
16351635
// actualObj, err := SomeFunction()
16361636
// if assert.NoError(t, err) {
@@ -1647,7 +1647,7 @@ func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool {
16471647
return true
16481648
}
16491649

1650-
// Error asserts that a function returned an error (i.e. not `nil`).
1650+
// Error asserts that a function returned a non-nil error (ie. an error).
16511651
//
16521652
// actualObj, err := SomeFunction()
16531653
// assert.Error(t, err)
@@ -1662,7 +1662,7 @@ func Error(t TestingT, err error, msgAndArgs ...interface{}) bool {
16621662
return true
16631663
}
16641664

1665-
// EqualError asserts that a function returned an error (i.e. not `nil`)
1665+
// EqualError asserts that a function returned a non-nil error (i.e. an error)
16661666
// and that it is equal to the provided error.
16671667
//
16681668
// actualObj, err := SomeFunction()
@@ -1685,8 +1685,8 @@ func EqualError(t TestingT, theError error, errString string, msgAndArgs ...inte
16851685
return true
16861686
}
16871687

1688-
// ErrorContains asserts that a function returned an error (i.e. not `nil`)
1689-
// and that the error contains the specified substring.
1688+
// ErrorContains asserts that a function returned a non-nil error (i.e. an
1689+
// error) and that the error contains the specified substring.
16901690
//
16911691
// actualObj, err := SomeFunction()
16921692
// assert.ErrorContains(t, err, expectedErrorSubString)

assert/doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
//
4141
// # Assertions
4242
//
43-
// Assertions allow you to easily write test code, and are global funcs in the `assert` package.
44-
// All assertion functions take, as the first argument, the `*testing.T` object provided by the
43+
// Assertions allow you to easily write test code, and are global funcs in the assert package.
44+
// All assertion functions take, as the first argument, the *testing.T object provided by the
4545
// testing framework. This allows the assertion funcs to write the failings and other details to
4646
// the correct place.
4747
//

mock/mock.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,8 @@ func (m *Mock) AssertNotCalled(t TestingT, methodName string, arguments ...inter
712712
return true
713713
}
714714

715-
// IsMethodCallable checking that the method can be called
716-
// If the method was called more than `Repeatability` return false
715+
// IsMethodCallable returns true if given methodName and arguments have an
716+
// unsatisfied expected call registered in the Mock.
717717
func (m *Mock) IsMethodCallable(t TestingT, methodName string, arguments ...interface{}) bool {
718718
if h, ok := t.(tHelper); ok {
719719
h.Helper()

require/doc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Package require implements the same assertions as the `assert` package but
1+
// Package require implements the same assertions as the assert package but
22
// stops test execution when a test fails.
33
//
44
// # Example Usage
@@ -21,8 +21,8 @@
2121
//
2222
// # Assertions
2323
//
24-
// The `require` package have same global functions as in the `assert` package,
25-
// but instead of returning a boolean result they call `t.FailNow()`.
24+
// The require package have same global functions as in the assert package,
25+
// but instead of returning a boolean result they call "t.FailNow()".
2626
// A consequence of this is that it must be called from the goroutine running
2727
// the test function, not from other goroutines created during the test.
2828
//

require/require.go

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

require/require_forward.go

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

suite/suite.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ func (suite *Suite) Require() *require.Assertions {
6363
return suite.require
6464
}
6565

66-
// Assert returns an assert context for suite. Normally, you can call
67-
// `suite.NoError(expected, actual)`, but for situations where the embedded
68-
// methods are overridden (for example, you might want to override
69-
// assert.Assertions with require.Assertions), this method is provided so you
70-
// can call `suite.Assert().NoError()`.
66+
// Assert returns an assert context for suite. Normally, you can call:
67+
//
68+
// suite.NoError(err)
69+
//
70+
// But for situations where the embedded methods are overridden (for example,
71+
// you might want to override assert.Assertions with require.Assertions), this
72+
// method is provided so you can call:
73+
//
74+
// suite.Assert().NoError(err)
7175
func (suite *Suite) Assert() *assert.Assertions {
7276
suite.mu.Lock()
7377
defer suite.mu.Unlock()

0 commit comments

Comments
 (0)