From 07a870e63be9ef4541cfaa7632fc367344fc4c15 Mon Sep 17 00:00:00 2001 From: Sergey Kacheev Date: Mon, 5 Apr 2021 12:29:51 +0700 Subject: [PATCH] clarify test --- v3/process/process_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v3/process/process_test.go b/v3/process/process_test.go index df5b14d..b82030c 100644 --- a/v3/process/process_test.go +++ b/v3/process/process_test.go @@ -333,12 +333,12 @@ func Test_Process_splitProcStat(t *testing.T) { parsedStatLine := splitProcStat([]byte(statLine)) assert.Equal(t, expectedName, parsedStatLine[commandNameIndex]) for _, idx := range consideredFields { - idxByProcMan := idx + 1 - expected := statLineContent[idx] - parsed := parsedStatLine[idxByProcMan] + expected := strconv.Itoa(idx) + parsed := parsedStatLine[idx] assert.Equal( t, expected, parsed, - "field %d (index from 1 as in man proc) must have index %s", idxByProcMan, expected, + "field %d (index from 1 as in man proc) must be %q but %q is received", + idx, expected, parsed, ) } })