From 6edaf3d5675510e936ac906451230ef25a522713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Czapli=C5=84ski?= Date: Sun, 12 Apr 2020 23:50:45 +0200 Subject: tests: tiny tweak to naming --- up_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/up_test.go b/up_test.go index de31c59..20e8482 100644 --- a/up_test.go +++ b/up_test.go @@ -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) } } } -- cgit v1.2.3