aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_gl_hints.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-05-24 16:14:30 -0400
committerDavid Robillard <d@drobilla.net>2021-05-24 20:44:16 -0400
commit44645c11c085dfe115a59c9ef8cbd57f938596dc (patch)
tree131e4828689db7a01f9272b04ef3335f625ebcaa /test/test_gl_hints.c
parentf535b6eaeed44093bed7d90b4be76363c2e2e4f4 (diff)
downloadpugl-44645c11c085dfe115a59c9ef8cbd57f938596dc.tar.gz
pugl-44645c11c085dfe115a59c9ef8cbd57f938596dc.tar.bz2
pugl-44645c11c085dfe115a59c9ef8cbd57f938596dc.zip
Test invalid hint cases
Diffstat (limited to 'test/test_gl_hints.c')
-rw-r--r--test/test_gl_hints.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_gl_hints.c b/test/test_gl_hints.c
index d99a57f..6fce42c 100644
--- a/test/test_gl_hints.c
+++ b/test/test_gl_hints.c
@@ -49,6 +49,18 @@ main(void)
puglSetEventFunc(view, onEvent);
puglSetDefaultSize(view, 512, 512);
+ // Check invalid cases
+ assert(puglSetViewHint(view, PUGL_USE_COMPAT_PROFILE, PUGL_DONT_CARE) ==
+ PUGL_BAD_PARAMETER);
+ assert(puglSetViewHint(view, PUGL_USE_DEBUG_CONTEXT, PUGL_DONT_CARE) ==
+ PUGL_BAD_PARAMETER);
+ assert(puglSetViewHint(view, PUGL_CONTEXT_VERSION_MAJOR, PUGL_DONT_CARE) ==
+ PUGL_BAD_PARAMETER);
+ assert(puglSetViewHint(view, PUGL_CONTEXT_VERSION_MINOR, PUGL_DONT_CARE) ==
+ PUGL_BAD_PARAMETER);
+ assert(puglSetViewHint(view, PUGL_SWAP_INTERVAL, PUGL_DONT_CARE) ==
+ PUGL_BAD_PARAMETER);
+
// Set all hints that support it to PUGL_DONT_CARE
assert(!puglSetViewHint(view, PUGL_RED_BITS, PUGL_DONT_CARE));
assert(!puglSetViewHint(view, PUGL_GREEN_BITS, PUGL_DONT_CARE));