diff options
author | David Robillard <d@drobilla.net> | 2022-06-07 21:19:24 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-06-07 21:19:24 -0400 |
commit | ce5b4cdba3fffac81bfa7ee4a3bffd99fe7f9935 (patch) | |
tree | 297d825de02b07e30481b13fec0677307ee66849 /test | |
parent | 9352879b5f95c683f406bf866fd81df02fe7429b (diff) | |
download | pugl-ce5b4cdba3fffac81bfa7ee4a3bffd99fe7f9935.tar.gz pugl-ce5b4cdba3fffac81bfa7ee4a3bffd99fe7f9935.tar.bz2 pugl-ce5b4cdba3fffac81bfa7ee4a3bffd99fe7f9935.zip |
Make puglRealize() always gracefully fail with a bad configuration
Diffstat (limited to 'test')
-rw-r--r-- | test/test_realize.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_realize.c b/test/test_realize.c index 50eba46..cf2cde6 100644 --- a/test/test_realize.c +++ b/test/test_realize.c @@ -65,9 +65,13 @@ main(int argc, char** argv) test.view = puglNewView(test.world); puglSetClassName(test.world, "PuglTest"); puglSetWindowTitle(test.view, "Pugl Realize Test"); - puglSetBackend(test.view, puglStubBackend()); puglSetHandle(test.view, &test); puglSetEventFunc(test.view, onEvent); + assert(puglRealize(test.view) == PUGL_BAD_BACKEND); + + puglSetBackend(test.view, puglStubBackend()); + assert(puglRealize(test.view) == PUGL_BAD_CONFIGURATION); + puglSetSizeHint(test.view, PUGL_DEFAULT_SIZE, 512, 512); // Create initially invisible window |