mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: fix checkFIle impl
This commit is contained in:
1 parent
8e68670de2
commit
ba3c6bb235
6 files changed
+7
-8
No files matched your search
@@ -64,7 +64,7 @@ export default async function readCases(folder: string, cfg: Record<string, any>
|
||||
result.count = result.outputs?.length || Math.sum((result.subtasks || []).map((s) => s.cases.length));
|
||||
if (!result.count) {
|
||||
try {
|
||||
result.subtasks = readSubtasksFromFiles(await collectFiles(folder), checkFile, cfg);
|
||||
result.subtasks = readSubtasksFromFiles(await collectFiles(folder), cfg);
|
||||
result.count = Math.sum(result.subtasks.map((i) => i.cases.length));
|
||||
if (cfg.isSelfSubmission) args.next?.({ message: { message: 'Found {0} testcases.', params: [result.count] } });
|
||||
} catch (e) {
|
||||
|
||||
Reference in new issue
Block a user