Skip to content

Commit db98b18

Browse files
committed
fix some of the failing unit tests
1 parent dfce95c commit db98b18

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/evaluator_test.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ public static function provide_invalid_diff(): array {
133133
['The first argument of diff() must be a list.', 'diff("", "");'],
134134
['The second argument of diff() must be a list.', 'diff([1,2,3], 1);'],
135135
['diff() expects two lists of the same size.', 'diff([1,2,3], [1,2]);'],
136-
['When using diff(), the first list must contain only numbers or only strings.', 'diff([[1,2]], [1]);'],
136+
['When using diff(), the first list must contain only numbers or only strings.', 'diff([[1,2]], [[1,2]]);'],
137+
['diff(): type mismatch for element #0 (zero-indexed) of the second list.', 'diff([[1,2]], [1]);'],
137138
['diff(): type mismatch for element #1 (zero-indexed) of the first list.', 'diff([1,"a"], [1,2]);'],
138139
['diff(): type mismatch for element #1 (zero-indexed) of the first list.', 'diff(["a",1], ["a","b"]);'],
139140
['diff(): type mismatch for element #0 (zero-indexed) of the second list.', 'diff([1,2], ["a",2]);'],

tests/question_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ public function test_summarise_response_threeparts(): void {
955955
$summary2 = $q->parts[2]->summarise_response($response);
956956
self::assertEquals('7', $summary2);
957957
$summary = $q->summarise_response($response);
958-
self::assertEquals('5, 6, 7', $summary);
958+
self::assertEquals('5; 6; 7', $summary);
959959
}
960960

961961
public function test_summarise_response_test1(): void {
@@ -973,7 +973,7 @@ public function test_summarise_response_test1(): void {
973973
$summary3 = $q->parts[3]->summarise_response($response);
974974
self::assertEquals('50', $summary3);
975975
$summary = $q->summarise_response($response);
976-
self::assertEquals('30m/s, 20, m/s, 40, 50', $summary);
976+
self::assertEquals('30m/s; 20, m/s; 40; 50', $summary);
977977
}
978978

979979
public function test_is_complete_response_test3(): void {

0 commit comments

Comments
 (0)