summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-04 16:11:53 -0800
committerEric Anholt <eric@anholt.net>2013-12-04 16:11:53 -0800
commit106298f2f9ef5cea1714156f1c2068710cea4e6c (patch)
treee43fb9ac1c83daaf85b8e2cfcb731da0edf80655 /test
parent42fd4b607ad4a16939abd5d69792080c8092d5e3 (diff)
Add a little more testing of our public GLX API.
Diffstat (limited to 'test')
-rw-r--r--test/glx_public_api.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/glx_public_api.c b/test/glx_public_api.c
index 71cf45c..1eab7bf 100644
--- a/test/glx_public_api.c
+++ b/test/glx_public_api.c
@@ -88,6 +88,25 @@ test_glx_version(void)
return true;
}
+static bool
+test_glx_extension_supported(void)
+{
+ if (!epoxy_has_glx_extension("GLX_ARB_get_proc_address")) {
+ fprintf(stderr,
+ "Incorrectly reported no support for GLX_ARB_get_proc_address "
+ "(should always be present in Linux ABI)\n");
+ return false;
+ }
+
+ if (epoxy_has_glx_extension("GLX_EXT_ham_sandwich")) {
+ fprintf(stderr,
+ "Incorrectly reported support for GLX_EXT_ham_sandwich\n");
+ return false;
+ }
+
+ return true;
+}
+
int
main(int argc, char **argv)
{
@@ -98,6 +117,7 @@ main(int argc, char **argv)
pass = test_gl_version() && pass;
pass = test_glx_version() && pass;
+ pass = test_glx_extension_supported() && pass;
return pass != true;
}