equal
deleted
inserted
replaced
6 |
6 |
7 out=${1:-output} |
7 out=${1:-output} |
8 |
8 |
9 echo "" > $out |
9 echo "" > $out |
10 |
10 |
|
11 echo `date` >> $out |
|
12 echo >> $out |
11 echo "Below is the feedback and provisional marks for your submission" >> $out |
13 echo "Below is the feedback and provisional marks for your submission" >> $out |
12 echo "for assignment 6 Part 1 + 2. Please note all marks are provisional until" >> $out |
14 echo "for the Basic Part of Assignment 6. Please note all marks are provisional until" >> $out |
13 echo "ratified by the assessment board -- this is not an official" >> $out |
15 echo "ratified by the assessment board -- this is not an official" >> $out |
14 echo "results transcript." >> $out |
16 echo "results transcript." >> $out |
15 echo "" >> $out |
17 echo "" >> $out |
16 |
18 |
17 echo "Below is the feedback for your submission for collatz.scala" >> $out |
19 echo "The feedback for your submission for collatz.scala" >> $out |
18 echo "" >> $out |
20 echo "" >> $out |
19 |
21 |
20 # marks for CW6 parts 1 + 2 |
22 # marks for CW6 part 1 |
21 marks=$(( 0 )) |
23 marks=$(( 0 )) |
22 |
24 |
23 # compilation tests |
25 # compilation tests |
24 |
26 |
25 function scala_compile { |
27 function scala_compile { |
26 (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala -nc "$1" 2> /dev/null 1> /dev/null) |
28 (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala "$1" 2> /dev/null 1> /dev/null) |
27 } |
29 } |
28 |
30 |
29 # functional tests |
31 # functional tests |
30 |
32 |
31 function scala_assert { |
33 function scala_assert { |
32 (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null) |
34 (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null) |
33 } |
35 } |
34 |
36 |
35 # purity test |
37 # purity test |
36 |
38 |
37 function scala_vars { |
39 function scala_vars { |
68 tsts=$(( 1 )) |
70 tsts=$(( 1 )) |
69 fi |
71 fi |
70 else |
72 else |
71 tsts=$(( 1 )) |
73 tsts=$(( 1 )) |
72 fi |
74 fi |
|
75 |
|
76 echo >> $out |
73 |
77 |
74 ### collatz tests |
78 ### collatz tests |
75 |
79 |
76 if [ $tsts -eq 0 ] |
80 if [ $tsts -eq 0 ] |
77 then |
81 then |
114 fi |
118 fi |
115 |
119 |
116 |
120 |
117 |
121 |
118 ## final marks |
122 ## final marks |
119 echo "Overall mark for Part 1" | tee -a $out |
123 echo >> $out |
|
124 echo "Overall mark for Basic Part" | tee -a $out |
120 echo " $marks" | tee -a $out |
125 echo " $marks" | tee -a $out |
121 |
126 |
122 |
127 |