JOJ3/internal/parser/diff/meta.go
张泊明518370910136 1c559ed2e5
All checks were successful
submodules sync / sync (push) Successful in 1m11s
build / build (push) Successful in 2m51s
build / trigger-build-image (push) Successful in 11s
chore(parser/diff): double max diff length as it is for 2 files now
2025-07-19 18:35:25 -07:00

39 lines
925 B
Go

// Package diff implements string comparison functionality for the specific
// output files, comparing then with expected answers and assigning scores based
// on results.
package diff
import "github.com/joint-online-judge/JOJ3/internal/stage"
var name = "diff"
type Output struct {
Score int
Filename string
AnswerPath string
CompareSpace bool
AlwaysHide bool
ForceQuitOnDiff bool
MaxDiffLength int `default:"4096"` // just for reference
MaxDiffLines int `default:"50"` // just for reference
HideCommonPrefix bool
}
type Case struct {
Outputs []Output
}
type Conf struct {
PassComment string `default:"🥳Passed!"`
FailComment string `default:"🧐Failed..."`
FailOnNotAccepted bool `default:"true"`
ForceQuitOnFailed bool `default:"false"`
Cases []Case
}
type Diff struct{}
func init() {
stage.RegisterParser(name, &Diff{})
}