gbasm: return the position of the first differing byte
This aids debugging failing tests by showing exactly where things failed in assertions that follow failed comparisons.
This commit is contained in:
@@ -21,7 +21,7 @@ static int cmp_mem(const uint8_t *test_data, const uint8_t *expected_data, size_
|
||||
if (test_data[i] != expected_data[i]) {
|
||||
g_test_message("memory contents differed at index %zu, data=%x, expected=%x",
|
||||
i, test_data[i], expected_data[i]);
|
||||
return -1;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user