|
1 | 1 | { |
2 | | - "resource_limits" : { |
3 | | - "RLIMIT_CPU" : 60, |
4 | | - "RLIMIT_NPROC" : 100, |
5 | | - "RLIMIT_AS" : "RLIM_INFINITY" |
6 | | - }, |
| 2 | + "resource_limits" : { |
| 3 | + "RLIMIT_CPU" : 60, |
| 4 | + "RLIMIT_NPROC" : 100, |
| 5 | + "RLIMIT_AS" : "RLIM_INFINITY" |
| 6 | + }, |
7 | 7 |
|
8 | | - "testcases" : [ |
9 | | - { |
10 | | - // Static analysis can also be performed upon C++ code. |
11 | | - // Here, no compilation is performed at all; instead, student code is examined to |
12 | | - // ensure that it does not use the "goto" keyword. |
13 | | - "title" : "C++ - Check for goto", |
14 | | - "type" : "Compilation", |
15 | | - "command" : [ "submitty_count_token -l c goto *.cpp" ], |
16 | | - "points" : 10, |
17 | | - "validation" : [ |
| 8 | + // Static analysis can also be performed upon C++ code. |
| 9 | + // Here, no compilation is performed at all; instead, student code is examined to |
| 10 | + // ensure that it does not use either the "goto" or "auto" keywords. |
| 11 | + "testcases" : [ |
18 | 12 | { |
19 | | - "method" : "intComparison", |
20 | | - "actual_file" : "STDOUT.txt", |
21 | | - "description" : "Number of `goto`", |
22 | | - "comparison" : "eq", |
23 | | - "term" : 0, |
24 | | - "failure_message" : "You must not use the `goto` keyword.", |
25 | | - "show_message" : "on_failure", |
26 | | - "show_actual" : "never" |
| 13 | + |
| 14 | + "title" : "Check for goto and auto", |
| 15 | + "command" : [ "submitty_count_token -l c goto *.cpp", |
| 16 | + "submitty_count_token -l c auto *.cpp" ], |
| 17 | + "points" : 2, |
| 18 | + "validation" : [ |
| 19 | + { |
| 20 | + // number of goto must be 0 |
| 21 | + "method" : "intComparison", |
| 22 | + "actual_file" : "STDOUT_0.txt", |
| 23 | + "description" : "Number of `goto`", |
| 24 | + "comparison" : "eq", |
| 25 | + "term" : 0, |
| 26 | + "failure_message" : "You must not use the `goto` keyword.", |
| 27 | + "show_message" : "on_failure", |
| 28 | + "show_actual" : "never" |
| 29 | + }, |
| 30 | + { |
| 31 | + // number of auto must be 0 |
| 32 | + "method" : "intComparison", |
| 33 | + "actual_file" : "STDOUT_1.txt", |
| 34 | + "description" : "Number of `auto`", |
| 35 | + "comparison" : "eq", |
| 36 | + "term" : 0, |
| 37 | + "failure_message" : "You must not use the `auto` keyword.", |
| 38 | + "show_message" : "on_failure", |
| 39 | + "show_actual" : "never" |
| 40 | + } |
| 41 | + ] |
27 | 42 | } |
28 | | - ] |
29 | | - } |
30 | | - ] |
| 43 | + ] |
31 | 44 | } |
0 commit comments