aboutsummaryrefslogtreecommitdiff
path: root/test/pugl_gl3_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-11-03 21:13:40 +0100
committerDavid Robillard <d@drobilla.net>2019-11-09 12:15:17 +0100
commitb5f04656a4b3d1b43a66585ead8ef55536a4fdbc (patch)
treeefc8765b6e7a5c670735205593a7daed38bce83b /test/pugl_gl3_test.c
parentbe838db18af13390cb9f705d36ab83396d2dd1e6 (diff)
Add puglStrerror() and improve test program error reporting
Diffstat (limited to 'test/pugl_gl3_test.c')
-rw-r--r--test/pugl_gl3_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/pugl_gl3_test.c b/test/pugl_gl3_test.c
index 8228336..21db4b2 100644
--- a/test/pugl_gl3_test.c
+++ b/test/pugl_gl3_test.c
@@ -313,8 +313,10 @@ main(int argc, char** argv)
puglSetHandle(app.view, &app);
puglSetEventFunc(app.view, onEvent);
- if (puglCreateWindow(app.view, "Pugl OpenGL 3")) {
- fprintf(stderr, "error: Failed to create window\n");
+ const PuglStatus st = puglCreateWindow(app.view, "Pugl OpenGL 3");
+ if (st) {
+ fprintf(stderr, "error: Failed to create window (%s)\n",
+ puglStrerror(st));
return 1;
}