clarify test
This commit is contained in:
parent
306f6d104b
commit
07a870e63b
|
@ -333,12 +333,12 @@ func Test_Process_splitProcStat(t *testing.T) {
|
||||||
parsedStatLine := splitProcStat([]byte(statLine))
|
parsedStatLine := splitProcStat([]byte(statLine))
|
||||||
assert.Equal(t, expectedName, parsedStatLine[commandNameIndex])
|
assert.Equal(t, expectedName, parsedStatLine[commandNameIndex])
|
||||||
for _, idx := range consideredFields {
|
for _, idx := range consideredFields {
|
||||||
idxByProcMan := idx + 1
|
expected := strconv.Itoa(idx)
|
||||||
expected := statLineContent[idx]
|
parsed := parsedStatLine[idx]
|
||||||
parsed := parsedStatLine[idxByProcMan]
|
|
||||||
assert.Equal(
|
assert.Equal(
|
||||||
t, expected, parsed,
|
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,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue