aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_gl_hints.c13
-rw-r--r--test/test_stub_hints.c8
-rw-r--r--test/test_utils.h10
3 files changed, 18 insertions, 13 deletions
diff --git a/test/test_gl_hints.c b/test/test_gl_hints.c
index 64c7342..9a0b168 100644
--- a/test/test_gl_hints.c
+++ b/test/test_gl_hints.c
@@ -37,14 +37,16 @@ main(void)
puglSetSizeHint(view, PUGL_DEFAULT_SIZE, 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) ==
+ assert(puglSetViewHint(view, PUGL_CONTEXT_API, 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_CONTEXT_PROFILE, PUGL_DONT_CARE) ==
+ PUGL_BAD_PARAMETER);
+ assert(puglSetViewHint(view, PUGL_CONTEXT_DEBUG, PUGL_DONT_CARE) ==
+ PUGL_BAD_PARAMETER);
assert(puglSetViewHint(view, PUGL_SWAP_INTERVAL, PUGL_DONT_CARE) ==
PUGL_BAD_PARAMETER);
@@ -65,10 +67,11 @@ main(void)
printViewHints(view);
// Check that no hints are set to PUGL_DONT_CARE
- assert(puglGetViewHint(view, PUGL_USE_COMPAT_PROFILE) != PUGL_DONT_CARE);
- assert(puglGetViewHint(view, PUGL_USE_DEBUG_CONTEXT) != PUGL_DONT_CARE);
+ assert(puglGetViewHint(view, PUGL_CONTEXT_API) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_CONTEXT_VERSION_MAJOR) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_CONTEXT_VERSION_MINOR) != PUGL_DONT_CARE);
+ assert(puglGetViewHint(view, PUGL_CONTEXT_PROFILE) != PUGL_DONT_CARE);
+ assert(puglGetViewHint(view, PUGL_CONTEXT_DEBUG) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_RED_BITS) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_GREEN_BITS) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_BLUE_BITS) != PUGL_DONT_CARE);
diff --git a/test/test_stub_hints.c b/test/test_stub_hints.c
index d5331c8..09205b3 100644
--- a/test/test_stub_hints.c
+++ b/test/test_stub_hints.c
@@ -50,9 +50,9 @@ main(void)
assert(!puglSetViewHint(view, PUGL_REFRESH_RATE, PUGL_DONT_CARE));
// Check failure to set PUGL_DONT_CARE for hints that don't support it
- assert(puglSetViewHint(view, PUGL_USE_COMPAT_PROFILE, PUGL_DONT_CARE) ==
+ assert(puglSetViewHint(view, PUGL_CONTEXT_PROFILE, PUGL_DONT_CARE) ==
PUGL_BAD_PARAMETER);
- assert(puglSetViewHint(view, PUGL_USE_DEBUG_CONTEXT, PUGL_DONT_CARE) ==
+ assert(puglSetViewHint(view, PUGL_CONTEXT_DEBUG, PUGL_DONT_CARE) ==
PUGL_BAD_PARAMETER);
assert(puglSetViewHint(view, PUGL_CONTEXT_VERSION_MAJOR, PUGL_DONT_CARE) ==
PUGL_BAD_PARAMETER);
@@ -66,8 +66,8 @@ main(void)
printViewHints(view);
// Check that no relevant hints are set to PUGL_DONT_CARE
- assert(puglGetViewHint(view, PUGL_USE_COMPAT_PROFILE) != PUGL_DONT_CARE);
- assert(puglGetViewHint(view, PUGL_USE_DEBUG_CONTEXT) != PUGL_DONT_CARE);
+ assert(puglGetViewHint(view, PUGL_CONTEXT_PROFILE) != PUGL_DONT_CARE);
+ assert(puglGetViewHint(view, PUGL_CONTEXT_DEBUG) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_CONTEXT_VERSION_MAJOR) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_CONTEXT_VERSION_MINOR) != PUGL_DONT_CARE);
assert(puglGetViewHint(view, PUGL_RED_BITS) != PUGL_DONT_CARE);
diff --git a/test/test_utils.h b/test/test_utils.h
index db3485b..8e21d97 100644
--- a/test/test_utils.h
+++ b/test/test_utils.h
@@ -255,14 +255,16 @@ static inline const char*
puglViewHintString(const PuglViewHint hint)
{
switch (hint) {
- case PUGL_USE_COMPAT_PROFILE:
- return "Use compatible profile";
- case PUGL_USE_DEBUG_CONTEXT:
- return "Use debug context";
+ case PUGL_CONTEXT_API:
+ return "Context API";
case PUGL_CONTEXT_VERSION_MAJOR:
return "Context major version";
case PUGL_CONTEXT_VERSION_MINOR:
return "Context minor version";
+ case PUGL_CONTEXT_PROFILE:
+ return "Context profile";
+ case PUGL_CONTEXT_DEBUG:
+ return "Context debug";
case PUGL_RED_BITS:
return "Red bits";
case PUGL_GREEN_BITS: