()
| 62 | } |
| 63 | |
| 64 | function auto() { |
| 65 | const state = store.getState(); |
| 66 | const subtasks = readSubtasksFromFiles(state.testdata.map((i) => i.name), {}); |
| 67 | const current = state.config.subtasks.flatMap((i) => i.cases).concat(state.config.__cases); |
| 68 | const pending = []; |
| 69 | for (const c of subtasks.flatMap((s) => s.cases)) { |
| 70 | if (!current.find((i) => i.input === c.input && i.output === c.output)) { |
| 71 | pending.push({ |
| 72 | input: c.input, |
| 73 | output: c.output, |
| 74 | }); |
| 75 | } |
| 76 | } |
| 77 | store.dispatch({ |
| 78 | type: 'problemconfig/addTestcases', |
| 79 | cases: pending, |
| 80 | }); |
| 81 | } |
| 82 | |
| 83 | return (<> |
| 84 | <div |
nothing calls this directly
no test coverage detected