tests: Return early if initialization fails

This commit is contained in:
Sebastian Krzyszkowiak 2023-11-02 07:39:10 +01:00
parent 7131334d6a
commit f98eb9eb70
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -36,6 +36,9 @@ int main(int argc, char** argv) {
al_set_app_name("libsuperderpy"); al_set_app_name("libsuperderpy");
char* args[2] = {"", "--debug"}; char* args[2] = {"", "--debug"};
game = libsuperderpy_init(2, args, "test", (struct Params){}); game = libsuperderpy_init(2, args, "test", (struct Params){});
if (!game) {
return 1;
}
libsuperderpy_start(game); libsuperderpy_start(game);
int ret = test_timeline() || test_character(); int ret = test_timeline() || test_character();
libsuperderpy_destroy(game); libsuperderpy_destroy(game);