aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_view.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-11 14:27:55 -0500
committerDavid Robillard <d@drobilla.net>2023-01-11 17:06:13 -0500
commit5db9735bb07d84e74936c252ca1c62fdeb2dd117 (patch)
treec8e981e32f6568e9e28575d8cd73b7802a9a6eb2 /test/test_view.c
parent26d648604c522d89a4e564214924f786b786e29f (diff)
downloadpugl-5db9735bb07d84e74936c252ca1c62fdeb2dd117.tar.gz
pugl-5db9735bb07d84e74936c252ca1c62fdeb2dd117.tar.bz2
pugl-5db9735bb07d84e74936c252ca1c62fdeb2dd117.zip
Improve test coverage
Diffstat (limited to 'test/test_view.c')
-rw-r--r--test/test_view.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_view.c b/test/test_view.c
index e329a93..7f1a112 100644
--- a/test/test_view.c
+++ b/test/test_view.c
@@ -13,6 +13,7 @@
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
+#include <string.h>
typedef enum {
START,
@@ -74,6 +75,11 @@ main(int argc, char** argv)
puglSetSizeHint(test.view, PUGL_DEFAULT_SIZE, 256, 256);
puglSetPosition(test.view, 384, 640);
+ // Check basic accessors
+ assert(!strcmp(puglGetClassName(test.world), "PuglTest"));
+ assert(!strcmp(puglGetWindowTitle(test.view), "Pugl View Test"));
+ assert(puglGetBackend(test.view) == puglStubBackend());
+
// Create and show window
assert(!puglRealize(test.view));
assert(!puglShow(test.view, PUGL_SHOW_RAISE));