summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-07-18 16:22:22 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2014-11-09 22:44:08 +0000
commit00bc02eb4daa035f7c168c82f061f5e494b119c1 (patch)
tree52f151685b278ad140ca74736d31a0488cddab1a /tests
parentdea8dadda442af409eb464b1c95ecace562babb8 (diff)
test/gl_basic_test: add all_gl_rgb(a) tests
Neither one if the tests is platform specific, thus rename them to all_* and drop the unneeded duplication. v2: Use TEST_RUN2, in order to print a more sensible testname at runtime. v3: Correctly prefix x11_egl tests (missed out 'egl'). Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/gl_basic_test.c76
1 files changed, 24 insertions, 52 deletions
diff --git a/tests/functional/gl_basic_test.c b/tests/functional/gl_basic_test.c
index b00419f..6dbdba6 100644
--- a/tests/functional/gl_basic_test.c
+++ b/tests/functional/gl_basic_test.c
@@ -340,6 +340,21 @@ gl_basic_draw__(struct gl_basic_draw_args__ args)
ASSERT_TRUE(waffle_display_disconnect(dpy));
}
+//
+// List of tests common to all platforms.
+//
+
+TEST(gl_basic, all_gl_rgb)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL);
+}
+
+TEST(gl_basic, all_gl_rgba)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
+ .alpha=true);
+}
+
#ifdef WAFFLE_HAS_CGL
TEST(gl_basic, cgl_init)
{
@@ -358,17 +373,6 @@ TEST(gl_basic, cgl_gles2_unsupported)
.expect_error=WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM);
}
-TEST(gl_basic, cgl_gl_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL);
-}
-
-TEST(gl_basic, cgl_gl_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
- .alpha=true);
-}
-
TEST(gl_basic, cgl_gl_debug_is_unsupported)
{
gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
@@ -547,8 +551,8 @@ testsuite_cgl(void)
TEST_RUN(gl_basic, cgl_gles1_unsupported);
TEST_RUN(gl_basic, cgl_gles2_unsupported);
- TEST_RUN(gl_basic, cgl_gl_rgb);
- TEST_RUN(gl_basic, cgl_gl_rgba);
+ TEST_RUN2(gl_basic, cgl_gl_rgb, all_gl_rgb);
+ TEST_RUN2(gl_basic, cgl_gl_rgba, all_gl_rgba);
TEST_RUN(gl_basic, cgl_gl_debug_is_unsupported);
TEST_RUN(gl_basic, cgl_gl_fwdcompat_bad_attribute);
@@ -586,17 +590,6 @@ TEST(gl_basic, glx_init)
gl_basic_init(WAFFLE_PLATFORM_GLX);
}
-TEST(gl_basic, glx_gl_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL);
-}
-
-TEST(gl_basic, glx_gl_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
- .alpha=true);
-}
-
TEST(gl_basic, glx_gl_debug)
{
gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
@@ -869,8 +862,8 @@ testsuite_glx(void)
{
TEST_RUN(gl_basic, glx_init);
- TEST_RUN(gl_basic, glx_gl_rgb);
- TEST_RUN(gl_basic, glx_gl_rgba);
+ TEST_RUN2(gl_basic, glx_gl_rgb, all_gl_rgb);
+ TEST_RUN2(gl_basic, glx_gl_rgba, all_gl_rgb);
TEST_RUN(gl_basic, glx_gl_debug);
TEST_RUN(gl_basic, glx_gl_fwdcompat_bad_attribute);
@@ -930,17 +923,6 @@ TEST(gl_basic, wayland_init)
gl_basic_init(WAFFLE_PLATFORM_WAYLAND);
}
-TEST(gl_basic, wayland_gl_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL);
-}
-
-TEST(gl_basic, wayland_gl_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
- .alpha=true);
-}
-
TEST(gl_basic, wayland_gl_debug)
{
gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
@@ -1213,8 +1195,9 @@ testsuite_wayland(void)
{
TEST_RUN(gl_basic, wayland_init);
- TEST_RUN(gl_basic, wayland_gl_rgb);
- TEST_RUN(gl_basic, wayland_gl_rgba);
+ TEST_RUN2(gl_basic, wayland_gl_rgb, all_gl_rgb);
+ TEST_RUN2(gl_basic, wayland_gl_rgba, all_gl_rgba);
+
TEST_RUN(gl_basic, wayland_gl_debug);
TEST_RUN(gl_basic, wayland_gl_fwdcompat_bad_attribute);
@@ -1274,17 +1257,6 @@ TEST(gl_basic, x11_egl_init)
gl_basic_init(WAFFLE_PLATFORM_X11_EGL);
}
-TEST(gl_basic, x11_egl_gl_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL);
-}
-
-TEST(gl_basic, x11_egl_gl_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
- .alpha=true);
-}
-
TEST(gl_basic, x11_egl_gl_debug)
{
gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL,
@@ -1557,8 +1529,8 @@ testsuite_x11_egl(void)
{
TEST_RUN(gl_basic, x11_egl_init);
- TEST_RUN(gl_basic, x11_egl_gl_rgb);
- TEST_RUN(gl_basic, x11_egl_gl_rgba);
+ TEST_RUN2(gl_basic, x11_egl_gl_rgb, all_gl_rgb);
+ TEST_RUN2(gl_basic, x11_egl_gl_rgba, all_gl_rgba);
TEST_RUN(gl_basic, x11_egl_gl_debug);
TEST_RUN(gl_basic, x11_egl_gl_fwdcompat_bad_attribute);