运行Testlib的validator校验
(config *structs.JudgeConfiguration, moduleName string, caseIndex int)
| 97 | |
| 98 | // 运行Testlib的validator校验 |
| 99 | func runTestlibValidators(config *structs.JudgeConfiguration, moduleName string, caseIndex int) error { |
| 100 | if err := isValidatorExists(config); err != nil { |
| 101 | return err |
| 102 | } |
| 103 | if moduleName == "all" { |
| 104 | caseIndex = -1 |
| 105 | } |
| 106 | if moduleName == "all" || moduleName == "validator_cases" { |
| 107 | if err := RunTestlibValidatorCases(config, caseIndex); err != nil { |
| 108 | return err |
| 109 | } |
| 110 | } |
| 111 | // for test_cases |
| 112 | if moduleName == "all" || moduleName == "test_cases" { |
| 113 | if err := RunTestCasesInputValidation(config, -1); err != nil { |
| 114 | return err |
| 115 | } |
| 116 | } |
| 117 | return nil |
| 118 | } |
| 119 | |
| 120 | // RunTestlibValidatorCases 运行validator cases的校验 |
| 121 | // caseIndex < 0 表示校验全部 |
no test coverage detected