aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-10-03 19:38:55 +0200
committerDavid Robillard <d@drobilla.net>2020-10-04 12:52:37 +0200
commit0b876c3d4e87b65ea3b3f05ec3274b16600e47fc (patch)
tree09f4cb47953ac769c8b740900ea9b54ac8639a52 /test
parenta36408b7c641e0b9052315aed87ce8e591a6a717 (diff)
downloadpugl-0b876c3d4e87b65ea3b3f05ec3274b16600e47fc.tar.gz
pugl-0b876c3d4e87b65ea3b3f05ec3274b16600e47fc.tar.bz2
pugl-0b876c3d4e87b65ea3b3f05ec3274b16600e47fc.zip
Add refresh rate hint
Diffstat (limited to 'test')
-rw-r--r--test/test_gl_hints.c2
-rw-r--r--test/test_stub_hints.c2
-rw-r--r--test/test_utils.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/test/test_gl_hints.c b/test/test_gl_hints.c
index 0e8efbb..a40fdfa 100644
--- a/test/test_gl_hints.c
+++ b/test/test_gl_hints.c
@@ -57,6 +57,7 @@ main(void)
assert(!puglSetViewHint(view, PUGL_STENCIL_BITS, PUGL_DONT_CARE));
assert(!puglSetViewHint(view, PUGL_SAMPLES, PUGL_DONT_CARE));
assert(!puglSetViewHint(view, PUGL_DOUBLE_BUFFER, PUGL_DONT_CARE));
+ assert(!puglSetViewHint(view, PUGL_REFRESH_RATE, PUGL_DONT_CARE));
// Realize view and print all hints for debugging convenience
assert(!puglRealize(view));
@@ -78,6 +79,7 @@ main(void)
assert(puglGetViewHint(view, PUGL_SWAP_INTERVAL) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_RESIZABLE) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_IGNORE_KEY_REPEAT) != PUGL_DONT_CARE);
+ assert(puglGetViewHint(view, PUGL_REFRESH_RATE) != PUGL_DONT_CARE);
// Tear down
puglFreeView(view);
diff --git a/test/test_stub_hints.c b/test/test_stub_hints.c
index a74927e..96b2914 100644
--- a/test/test_stub_hints.c
+++ b/test/test_stub_hints.c
@@ -53,6 +53,7 @@ main(void)
assert(!puglSetViewHint(view, PUGL_GREEN_BITS, PUGL_DONT_CARE));
assert(!puglSetViewHint(view, PUGL_BLUE_BITS, PUGL_DONT_CARE));
assert(!puglSetViewHint(view, PUGL_ALPHA_BITS, PUGL_DONT_CARE));
+ assert(!puglSetViewHint(view, PUGL_REFRESH_RATE, PUGL_DONT_CARE));
// Realize view and print all hints for debugging convenience
assert(!puglRealize(view));
@@ -69,6 +70,7 @@ main(void)
assert(puglGetViewHint(view, PUGL_ALPHA_BITS) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_RESIZABLE) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_IGNORE_KEY_REPEAT) != PUGL_DONT_CARE);
+ assert(puglGetViewHint(view, PUGL_REFRESH_RATE) != PUGL_DONT_CARE);
// Tear down
puglFreeView(view);
diff --git a/test/test_utils.h b/test/test_utils.h
index 4253619..6148d84 100644
--- a/test/test_utils.h
+++ b/test/test_utils.h
@@ -255,6 +255,8 @@ puglViewHintString(const PuglViewHint hint)
return "Resizable";
case PUGL_IGNORE_KEY_REPEAT:
return "Ignore key repeat";
+ case PUGL_REFRESH_RATE:
+ return "Refresh rate";
case PUGL_NUM_VIEW_HINTS:
return "Unknown";
}