-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestCaseClass.template
More file actions
35 lines (31 loc) · 1.04 KB
/
TestCaseClass.template
File metadata and controls
35 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package %package%;
import net.egork.chelper.task.Test;
import net.egork.chelper.tester.TestCase;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Random;
import java.util.TreeSet;
public class %TestCaseClass% {
@TestCase
public Collection<Test> createTests() {
List<Test> tests = new ArrayList<>();
Random random = new Random(58);
for (int tid = 0; tid < 10; tid++) {
StringWriter input = new StringWriter();
PrintWriter in = new PrintWriter(input);
StringWriter output = new StringWriter();
PrintWriter out = new PrintWriter(output);
genTest(random, in, out);
// tests.add(new Test(input.toString(), output.toString()));
// tests.add(new Test(input.toString()));
}
return tests;
}
void genTest(Random random, PrintWriter in, PrintWriter out) {
int n = random.nextInt(1, 10);
in.println(n);
}
}