@@ -21,6 +21,7 @@ func TestMap(t *testing.T) {
2121 t .Parallel ()
2222
2323 test := func (t * testing.T , m slog.Map , exp string ) {
24+ t .Helper ()
2425 exp = indentJSON (t , exp )
2526 act := marshalJSON (t , m )
2627 assert .Equal (t , exp , act , "JSON" )
@@ -61,12 +62,12 @@ func TestMap(t *testing.T) {
6162 {
6263 "msg": "wrap1",
6364 "fun": "cdr.dev/slog_test.TestMap.func2",
64- "loc": "` + mapTestFile + `:40 "
65+ "loc": "` + mapTestFile + `:41 "
6566 },
6667 {
6768 "msg": "wrap2",
6869 "fun": "cdr.dev/slog_test.TestMap.func2",
69- "loc": "` + mapTestFile + `:41 "
70+ "loc": "` + mapTestFile + `:42 "
7071 },
7172 "EOF"
7273 ],
@@ -82,7 +83,7 @@ func TestMap(t *testing.T) {
8283 t .Run ("badJSON" , func (t * testing.T ) {
8384 t .Parallel ()
8485
85- mapTestFile = strings .Replace (mapTestFile , "_test" , "" , 1 )
86+ mapTestFile : = strings .Replace (mapTestFile , "_test" , "" , 1 )
8687
8788 test (t , slog .M (
8889 slog .F ("meow" , indentJSON ),
@@ -92,7 +93,7 @@ func TestMap(t *testing.T) {
9293 {
9394 "msg": "failed to marshal to JSON",
9495 "fun": "cdr.dev/slog.encode",
95- "loc": "` + mapTestFile + `:84 "
96+ "loc": "` + mapTestFile + `:88 "
9697 },
9798 "json: unsupported type: func(*testing.T, string) string"
9899 ],
0 commit comments