test cases: Don't fall off the end of main() without an exit status
This is undefined behaviour, and seems to have caused test failures when backporting Meson to an older toolchain in the Steam Runtime. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
e06dd48ad2
commit
f0e9a44d41
|
@ -7,4 +7,5 @@ int main(int argc, char **argv) {
|
|||
if (c != argv[1][0])
|
||||
fprintf(stderr, "Expected %x, got %x\n", (unsigned int) c, (unsigned int) argv[1][0]);
|
||||
assert(c == argv[1][0]);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -9,4 +9,5 @@ int main(int argc, char **argv) {
|
|||
if (s[0] != argv[1][0])
|
||||
fprintf(stderr, "Expected %x, got %x\n", (unsigned int) s[0], (unsigned int) argv[1][0]);
|
||||
assert(s[0] == argv[1][0]);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -14,4 +14,5 @@ int main(int argc, char **argv) {
|
|||
assert(s[0] == argv[1][0]);
|
||||
// There is no way to convert a macro argument into a character constant.
|
||||
// Otherwise we'd test that as well
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue