tests: print unexpected results as strings
Vala enums have a to_string method, so if a test produces an unexpected game result, we can print the symbolic constant instead of just saying something helpful like "game has result 1 not 3"
This commit is contained in:
parent
32d04f0be4
commit
8584abbec2
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class GlChess
|
|||
var move_result = state.get_result (out move_rule);
|
||||
if (move_result != result || move_rule != rule)
|
||||
{
|
||||
stderr.printf ("%d. FAIL %s + %s has result %d not %d\n", test_count, fen, move, move_result, result);
|
||||
stderr.printf ("%d. FAIL %s + %s has result %s not %s\n", test_count, fen, move, move_result.to_string (), result.to_string ());
|
||||
failure_count++;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue