diff options
author | David Robillard <d@drobilla.net> | 2019-11-18 16:20:33 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-11-18 19:33:16 +0100 |
commit | 47beee70b04438f291ba00b6dc9d14ec4a54c662 (patch) | |
tree | f26cd7364a69907becdc6e52db13cc8fe583207c /test/pugl_test.c | |
parent | dd90f0dc8918e3ebfc4f526e332bfdb71129531f (diff) |
Add test utility function for logging errors
Diffstat (limited to 'test/pugl_test.c')
-rw-r--r-- | test/pugl_test.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/pugl_test.c b/test/pugl_test.c index c680866..99720d2 100644 --- a/test/pugl_test.c +++ b/test/pugl_test.c @@ -330,9 +330,8 @@ main(int argc, char** argv) const uint8_t title[] = { 'P', 'u', 'g', 'l', ' ', 'P', 'r', 0xC3, 0xBC, 'f', 'u', 'n', 'g', 0 }; if ((st = puglCreateWindow(app.parent, (const char*)title))) { - fprintf(stderr, "error: Failed to create parent window (%s)\n", - puglStrerror(st)); - return 1; + return logError("Failed to create parent window (%s)\n", + puglStrerror(st)); } puglSetFrame(app.child, getChildFrame(parentFrame)); @@ -348,9 +347,8 @@ main(int argc, char** argv) puglSetEventFunc(app.child, onEvent); if ((st = puglCreateWindow(app.child, NULL))) { - fprintf(stderr, "error: Failed to create child window (%s)\n", - puglStrerror(st)); - return 1; + return logError("Failed to create child window (%s)\n", + puglStrerror(st)); } puglShowWindow(app.parent); |