github.com/LanceLRQ/deer-common@v0.0.9-0.20210319081233-e8222ac018a8/constants/testlib.go (about)

     1  package constants
     2  
     3  var TestlibBinaryPrefixs = map[string]string{
     4  	"generator":  "g_",
     5  	"validator":  "",
     6  	"checker":    "",
     7  	"interactor": "",
     8  }
     9  
    10  var TestlibExitMsgMapping = []struct {
    11  	ErrName     string
    12  	JudgeResult int
    13  	WithScore   bool
    14  }{
    15  	{ErrName: "ok", JudgeResult: JudgeFlagAC},
    16  	{ErrName: "wrong answer", JudgeResult: JudgeFlagWA},
    17  	{ErrName: "wrong output format", JudgeResult: JudgeFlagPE},
    18  	{ErrName: "FAIL", JudgeResult: JudgeFlagSpecialJudgeError},
    19  	{ErrName: "points", JudgeResult: JudgeFlagSpecialJudgeError}, // Unsupport
    20  	{ErrName: "unexpected eof", JudgeResult: JudgeFlagPE},
    21  	{ErrName: "partially correct", JudgeResult: JudgeFlagWA, WithScore: true},
    22  	{ErrName: "What is the code", JudgeResult: JudgeFlagSpecialJudgeError},
    23  }
    24  
    25  var TestlibOutcomeMapping = map[string]int{
    26  	"accepted":           JudgeFlagAC,
    27  	"wrong-answer":       JudgeFlagWA,
    28  	"presentation-error": JudgeFlagPE,
    29  	"fail":               JudgeFlagSpecialJudgeError,
    30  	"points":             JudgeFlagSpecialJudgeError, // Unsupport
    31  	"relative-scoring":   JudgeFlagSpecialJudgeError, // Unsupport
    32  	"unexpected-eof":     JudgeFlagPE,
    33  	"partially-correct":  JudgeFlagWA,
    34  	"reserved":           JudgeFlagSpecialJudgeError,
    35  }