aboutsummaryrefslogtreecommitdiffstats
path: root/test/pugl_gl3_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-11-18 16:20:33 +0100
committerDavid Robillard <d@drobilla.net>2019-11-18 19:33:16 +0100
commit47beee70b04438f291ba00b6dc9d14ec4a54c662 (patch)
treef26cd7364a69907becdc6e52db13cc8fe583207c /test/pugl_gl3_test.c
parentdd90f0dc8918e3ebfc4f526e332bfdb71129531f (diff)
downloadpugl-47beee70b04438f291ba00b6dc9d14ec4a54c662.tar.gz
pugl-47beee70b04438f291ba00b6dc9d14ec4a54c662.tar.bz2
pugl-47beee70b04438f291ba00b6dc9d14ec4a54c662.zip
Add test utility function for logging errors
Diffstat (limited to 'test/pugl_gl3_test.c')
-rw-r--r--test/pugl_gl3_test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/pugl_gl3_test.c b/test/pugl_gl3_test.c
index 06e816c..4f9bbb5 100644
--- a/test/pugl_gl3_test.c
+++ b/test/pugl_gl3_test.c
@@ -315,9 +315,7 @@ main(int argc, char** argv)
const PuglStatus st = puglCreateWindow(app.view, "Pugl OpenGL 3");
if (st) {
- fprintf(stderr, "error: Failed to create window (%s)\n",
- puglStrerror(st));
- return 1;
+ return logError("Failed to create window (%s)\n", puglStrerror(st));
}
// Enter context to set up GL stuff
@@ -325,7 +323,7 @@ main(int argc, char** argv)
// Load GL functions via GLAD
if (!gladLoadGLLoader((GLADloadproc)&puglGetProcAddress)) {
- fprintf(stderr, "error: Failed to load GL\n");
+ logError("Failed to load GL\n");
puglFreeView(app.view);
puglFreeWorld(app.world);
return 1;