equal
deleted
inserted
replaced
86 echo -e " clean(\"ab a abc\") == List(\"ab\", \"a\", \"abc\")" | tee -a $out |
86 echo -e " clean(\"ab a abc\") == List(\"ab\", \"a\", \"abc\")" | tee -a $out |
87 echo -e " clean(\"ab*a abc1\") == List(\"ab\", \"a\", \"abc1\")" | tee -a $out |
87 echo -e " clean(\"ab*a abc1\") == List(\"ab\", \"a\", \"abc1\")" | tee -a $out |
88 |
88 |
89 if (scala_assert "docdiff.scala" "docdiff_test1.scala") |
89 if (scala_assert "docdiff.scala" "docdiff_test1.scala") |
90 then |
90 then |
91 echo -e " --> success" | tee -a $out |
91 echo -e " --> success (+ 0.5 Marks)\n" | tee -a $out |
92 marks=$(( marks + 0.5 )) |
92 marks=$(( marks + 0.5 )) |
93 else |
93 else |
94 echo -e " --> ONE OF THE TESTS FAILED\n" | tee -a $out |
94 echo -e " --> ONE OF THE TESTS FAILED\n" | tee -a $out |
95 fi |
95 fi |
96 fi |
96 fi |
109 echo -e " " | tee -a $out |
109 echo -e " " | tee -a $out |
110 echo -e " occurrences(List(\"b\", \"b\", \"b\", \"b\", \"b\")) == Map(\"b\" -> 5)" | tee -a $out |
110 echo -e " occurrences(List(\"b\", \"b\", \"b\", \"b\", \"b\")) == Map(\"b\" -> 5)" | tee -a $out |
111 |
111 |
112 if (scala_assert "docdiff.scala" "docdiff_test2.scala") |
112 if (scala_assert "docdiff.scala" "docdiff_test2.scala") |
113 then |
113 then |
114 echo -e " --> success" | tee -a $out |
114 echo -e " --> success (+ 1 Mark)\n" | tee -a $out |
115 marks=$(( marks + 1.0 )) |
115 marks=$(( marks + 1.0 )) |
116 else |
116 else |
117 echo -e " --> ONE OF THE TESTS FAILED\n" | tee -a $out |
117 echo -e " --> ONE OF THE TESTS FAILED\n" | tee -a $out |
118 fi |
118 fi |
119 fi |
119 fi |
132 echo -e " val l3 = List(\"1\", \"2\", \"3\", \"4\", \"5\")" | tee -a $out |
132 echo -e " val l3 = List(\"1\", \"2\", \"3\", \"4\", \"5\")" | tee -a $out |
133 echo -e " prod(l1, l3) == 0 " | tee -a $out |
133 echo -e " prod(l1, l3) == 0 " | tee -a $out |
134 |
134 |
135 if (scala_assert "docdiff.scala" "docdiff_test3.scala") |
135 if (scala_assert "docdiff.scala" "docdiff_test3.scala") |
136 then |
136 then |
137 echo -e " --> success" | tee -a $out |
137 echo -e " --> success (+ 1 Mark)\n" | tee -a $out |
138 marks=$(( marks + 1.0 )) |
138 marks=$(( marks + 1.0 )) |
139 else |
139 else |
140 echo -e " --> ONE OF THE TESTS FAILED\n" | tee -a $out |
140 echo -e " --> ONE OF THE TESTS FAILED\n" | tee -a $out |
141 fi |
141 fi |
142 fi |
142 fi |
152 echo -e " overlap(l1, l1) == 1.0 " | tee -a $out |
152 echo -e " overlap(l1, l1) == 1.0 " | tee -a $out |
153 echo -e " overlap(l2, l2) == 1.0 " | tee -a $out |
153 echo -e " overlap(l2, l2) == 1.0 " | tee -a $out |
154 |
154 |
155 if (scala_assert "docdiff.scala" "docdiff_test4.scala") |
155 if (scala_assert "docdiff.scala" "docdiff_test4.scala") |
156 then |
156 then |
157 echo -e " --> success" | tee -a $out |
157 echo -e " --> success (+ 0.5 Marks)\n" | tee -a $out |
158 marks=$(( marks + 0.5 )) |
158 marks=$(( marks + 0.5 )) |
159 else |
159 else |
160 echo -e " --> ONE OF THE TESTS FAILED\n" | tee -a $out |
160 echo -e " --> ONE OF THE TESTS FAILED\n" | tee -a $out |
161 fi |
161 fi |
162 fi |
162 fi |