feat(parser/diff): log index & isSame
This commit is contained in:
parent
187b5f7057
commit
8924f174b4
|
@ -49,13 +49,22 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, true, err
|
return nil, true, err
|
||||||
}
|
}
|
||||||
slog.Debug("compare", "filename", output.FileName,
|
isSame := compareStrings(
|
||||||
"answer path", output.AnswerPath,
|
string(answer),
|
||||||
"actual length", len(result.Files[output.FileName]),
|
result.Files[output.FileName],
|
||||||
"answer length", len(string(answer)))
|
output.CompareSpace,
|
||||||
|
)
|
||||||
|
slog.Debug(
|
||||||
|
"compare",
|
||||||
|
"filename", output.FileName,
|
||||||
|
"answerPath", output.AnswerPath,
|
||||||
|
"actualLength", len(result.Files[output.FileName]),
|
||||||
|
"answerLength", len(string(answer)),
|
||||||
|
"index", i,
|
||||||
|
"isSame", isSame,
|
||||||
|
)
|
||||||
// If no difference, assign score
|
// If no difference, assign score
|
||||||
if compareStrings(string(answer), result.Files[output.FileName],
|
if isSame {
|
||||||
output.CompareSpace) {
|
|
||||||
score += output.Score
|
score += output.Score
|
||||||
comment += conf.PassComment
|
comment += conf.PassComment
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user