-
Notifications
You must be signed in to change notification settings - Fork 0
/
check
81 lines (67 loc) · 1.61 KB
/
check
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
# Please don't change this.
MAX_POINTS=150
test_feribot() {
n_tests=25
src_names=(feribot.c feribot.cpp Feribot.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=25
run_problem feribot 1
}
test_nostory() {
n_tests=25
src_names=(nostory.c nostory.cpp Nostory.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=25
run_problem nostory 2
}
test_sushi() {
n_tests=30
src_names=(sushi.c sushi.cpp Sushi.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=30
run_problem sushi 3
}
test_semnale() {
n_tests=30
src_names=(semnale.c semnale.cpp Semnale.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=30
run_problem semnale 4
}
test_badgpt() {
n_tests=25
src_names=(badgpt.c badgpt.cpp Badgpt.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=25
run_problem badgpt 5
}
test_homework() {
if [[ "$1" = "1" || "$1" = "feribot" ]]; then
test_feribot
elif [[ "$1" = "2" || "$1" = "nostory" ]]; then
test_nostory
elif [[ "$1" = "3" || "$1" = "sushi" ]]; then
test_sushi
elif [[ "$1" = "4" || "$1" = "semnale" ]]; then
test_semnale
elif [[ "$1" = "5" || "$1" = "badgpt" ]]; then
test_badgpt
elif [[ "$1" = "cs" ]]; then
echo "skip running tests"
else
test_feribot
test_nostory
test_sushi
test_semnale
test_badgpt
fi
}
BONUS_TASK=badgpt
# Please don't change this.
source "$(dirname "{0}")"/_utils/base_check.sh