From 106298f2f9ef5cea1714156f1c2068710cea4e6c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 4 Dec 2013 16:11:53 -0800 Subject: [PATCH] Add a little more testing of our public GLX API. --- test/glx_public_api.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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; }