diff options
author | Mateusz Czapliński <czapkofan@gmail.com> | 2020-04-12 23:50:45 +0200 |
---|---|---|
committer | Mateusz Czapliński <czapkofan@gmail.com> | 2020-04-12 23:50:45 +0200 |
commit | 6edaf3d5675510e936ac906451230ef25a522713 (patch) | |
tree | 3e69d21462fc04fd6f1df64ffde7a562656c8251 | |
parent | f22dd6a6e32d5dd535cfa2c13f15d8ec077802c5 (diff) |
tests: tiny tweak to naming
-rw-r--r-- | up_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2,8 +2,8 @@ package main import "testing" -func Test_Editor_insert(test *testing.T) { - cases := []struct { +func Test_Editor_insert(t *testing.T) { + tests := []struct { comment string e Editor insert []rune @@ -74,10 +74,10 @@ func Test_Editor_insert(test *testing.T) { }, } - for _, c := range cases { - c.e.insert(c.insert...) - if string(c.e.value) != string(c.wantValue) { - test.Errorf("%q: bad value\nwant: %q\nhave: %q", c.comment, c.wantValue, c.e.value) + for _, tt := range tests { + tt.e.insert(tt.insert...) + if string(tt.e.value) != string(tt.wantValue) { + t.Errorf("%q: bad value\nwant: %q\nhave: %q", tt.comment, tt.wantValue, tt.e.value) } } } |