Skip to content

Commit ca22e8a

Browse files
alexandearbraydonk
andauthored
fix typos in test names (google#227)
* fix typos in test names * Fix typo in Assert doc comment --------- Co-authored-by: Braydon Kains <[email protected]>
1 parent 23d4f3e commit ca22e8a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

command/command_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
// This test asserts the proper behaviour for `line_ending` settings specified
2626
// in formatter settings overriding the global configuration.
27-
func TestLineEndingFormatterVsGloabl(t *testing.T) {
27+
func TestLineEndingFormatterVsGlobal(t *testing.T) {
2828
c := &Command{
2929
Config: &Config{
3030
LineEnding: "lf",

internal/assert/assert.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525
NilErrMessage = "expected no error, got error:\n%v"
2626

2727
// The failure format string if the err is nil.
28-
NotNilErrMesage = "expected an error, got nil"
28+
NotNilErrMessage = "expected an error, got nil"
2929

3030
// The failure format string for slices being different sizes. Formatted with `expected` then `got`.
3131
SliceSizeMessage = "slices were different sizes.\nexpected len:%d\n got len:%d\n"
@@ -69,16 +69,16 @@ func DereferenceEqual[T comparable](t TestingT, expected *T, got *T) {
6969
DereferenceEqualMsg(t, expected, got, DereferenceEqualErrMsg, EqualMessage)
7070
}
7171

72-
// Assert that that `err` is nil. Uses `assert.NilErrMessage`.
72+
// Assert that `err` is nil. Uses `assert.NilErrMessage`.
7373
func NilErr(t TestingT, err error) {
7474
t.Helper()
7575
Assert(t, err == nil, NilErrMessage, err)
7676
}
7777

78-
// Assert that that `err` is not nil. Uses `assert.NotNillErrMesage`.
78+
// Assert that `err` is not nil. Uses `assert.NotNilErrMessage`.
7979
func NotNilErr(t TestingT, err error) {
8080
t.Helper()
81-
Assert(t, err != nil, NotNilErrMesage)
81+
Assert(t, err != nil, NotNilErrMessage)
8282
}
8383

8484
// Assert that slices `got` and `expected` are equal. Will produce a

internal/assert/assert_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func TestDereferenceEqualErr(t *testing.T) {
108108
}
109109
}
110110

111-
func TestDerefenceEqualFail(t *testing.T) {
111+
func TestDereferenceEqualFail(t *testing.T) {
112112
testInstance := newTMock()
113113
type x struct {
114114
num int

0 commit comments

Comments
 (0)