[waffle] [PATCH 4/8] test/gl_basic_test: introduce linux_gles* tests
Emil Velikov
emil.l.velikov at gmail.com
Mon Aug 4 07:34:19 PDT 2014
The EGL, GLX (and WGL spec) are identical wrt ES compat contexts thus it
makes little sense to have the very same tests three times.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
tests/functional/gl_basic_test.c | 398 ++++++++++++---------------------------
1 file changed, 119 insertions(+), 279 deletions(-)
diff --git a/tests/functional/gl_basic_test.c b/tests/functional/gl_basic_test.c
index b55883e..ee5a33f 100644
--- a/tests/functional/gl_basic_test.c
+++ b/tests/functional/gl_basic_test.c
@@ -545,6 +545,86 @@ TEST(gl_basic, linux_gl43_compat)
.version=43,
.profile=WAFFLE_CONTEXT_COMPATIBILITY_PROFILE);
}
+
+TEST(gl_basic, linux_gles1_rgb)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1);
+}
+
+TEST(gl_basic, linux_gles1_rgba)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
+ .alpha=true);
+}
+
+TEST(gl_basic, linux_gles10)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
+ .version=10,
+ .alpha=true);
+}
+
+TEST(gl_basic, linux_gles11)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
+ .version=11,
+ .alpha=true);
+}
+
+TEST(gl_basic, linux_gles1_fwdcompat_bad_attribute)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
+ .forward_compatible=true,
+ .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
+}
+
+TEST(gl_basic, linux_gles2_rgb)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2);
+}
+
+TEST(gl_basic, linux_gles2_rgba)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
+ .alpha=true);
+}
+
+TEST(gl_basic, linux_gles20)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
+ .version=20);
+}
+
+TEST(gl_basic, linux_gles2_fwdcompat_bad_attribute)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
+ .forward_compatible=true,
+ .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
+}
+
+TEST(gl_basic, linux_gles3_rgb)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3);
+}
+
+TEST(gl_basic, linux_gles3_rgba)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
+ .alpha=true);
+}
+
+TEST(gl_basic, linux_gles30)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
+ .version=30);
+}
+
+TEST(gl_basic, linux_gles3_fwdcompat_bad_attribute)
+{
+ gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
+ .forward_compatible=true,
+ .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
+}
#endif
#ifdef WAFFLE_HAS_CGL
@@ -748,86 +828,6 @@ TEST(gl_basic, glx_gl_fwdcompat_bad_attribute)
.expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
}
-TEST(gl_basic, glx_gles1_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1);
-}
-
-TEST(gl_basic, glx_gles1_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .alpha=true);
-}
-
-TEST(gl_basic, glx_gles10)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .version=10,
- .alpha=true);
-}
-
-TEST(gl_basic, glx_gles1_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
-TEST(gl_basic, glx_gles11)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .version=11,
- .alpha=true);
-}
-
-TEST(gl_basic, glx_gles2_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2);
-}
-
-TEST(gl_basic, glx_gles2_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .alpha=true);
-}
-
-TEST(gl_basic, glx_gles20)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .version=20);
-}
-
-TEST(gl_basic, glx_gles2_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
-TEST(gl_basic, glx_gles3_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3);
-}
-
-TEST(gl_basic, glx_gles3_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .alpha=true);
-}
-
-TEST(gl_basic, glx_gles30)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .version=30);
-}
-
-TEST(gl_basic, glx_gles3_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
static void
testsuite_glx(void)
{
@@ -868,24 +868,24 @@ testsuite_glx(void)
TEST_RUN(gl_basic, linux_gl42_compat);
TEST_RUN(gl_basic, linux_gl43_compat);
- TEST_RUN(gl_basic, glx_gles1_rgb);
- TEST_RUN(gl_basic, glx_gles1_rgba);
- TEST_RUN(gl_basic, glx_gles1_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles1_rgb);
+ TEST_RUN(gl_basic, linux_gles1_rgba);
+ TEST_RUN(gl_basic, linux_gles1_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, glx_gles10);
- TEST_RUN(gl_basic, glx_gles11);
+ TEST_RUN(gl_basic, linux_gles10);
+ TEST_RUN(gl_basic, linux_gles11);
- TEST_RUN(gl_basic, glx_gles2_rgb);
- TEST_RUN(gl_basic, glx_gles2_rgba);
- TEST_RUN(gl_basic, glx_gles2_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles2_rgb);
+ TEST_RUN(gl_basic, linux_gles2_rgba);
+ TEST_RUN(gl_basic, linux_gles2_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, glx_gles20);
+ TEST_RUN(gl_basic, linux_gles20);
- TEST_RUN(gl_basic, glx_gles3_rgb);
- TEST_RUN(gl_basic, glx_gles3_rgba);
- TEST_RUN(gl_basic, glx_gles3_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles3_rgb);
+ TEST_RUN(gl_basic, linux_gles3_rgba);
+ TEST_RUN(gl_basic, linux_gles3_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, glx_gles30);
+ TEST_RUN(gl_basic, linux_gles30);
}
#endif // WAFFLE_HAS_GLX
@@ -908,86 +908,6 @@ TEST(gl_basic, wayland_gl_fwdcompat_bad_attribute)
.expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
}
-TEST(gl_basic, wayland_gles1_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1);
-}
-
-TEST(gl_basic, wayland_gles1_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .alpha=true);
-}
-
-TEST(gl_basic, wayland_gles10)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .version=10,
- .alpha=true);
-}
-
-TEST(gl_basic, wayland_gles1_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
-TEST(gl_basic, wayland_gles11)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .version=11,
- .alpha=true);
-}
-
-TEST(gl_basic, wayland_gles2_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2);
-}
-
-TEST(gl_basic, wayland_gles2_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .alpha=true);
-}
-
-TEST(gl_basic, wayland_gles20)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .version=20);
-}
-
-TEST(gl_basic, wayland_gles2_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
-TEST(gl_basic, wayland_gles3_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3);
-}
-
-TEST(gl_basic, wayland_gles3_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .alpha=true);
-}
-
-TEST(gl_basic, wayland_gles30)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .version=30);
-}
-
-TEST(gl_basic, wayland_gles3_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
static void
testsuite_wayland(void)
{
@@ -1029,24 +949,24 @@ testsuite_wayland(void)
TEST_RUN(gl_basic, linux_gl42_compat);
TEST_RUN(gl_basic, linux_gl43_compat);
- TEST_RUN(gl_basic, wayland_gles1_rgb);
- TEST_RUN(gl_basic, wayland_gles1_rgba);
- TEST_RUN(gl_basic, wayland_gles1_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles1_rgb);
+ TEST_RUN(gl_basic, linux_gles1_rgba);
+ TEST_RUN(gl_basic, linux_gles1_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, wayland_gles10);
- TEST_RUN(gl_basic, wayland_gles11);
+ TEST_RUN(gl_basic, linux_gles10);
+ TEST_RUN(gl_basic, linux_gles11);
- TEST_RUN(gl_basic, wayland_gles2_rgb);
- TEST_RUN(gl_basic, wayland_gles2_rgba);
- TEST_RUN(gl_basic, wayland_gles2_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles2_rgb);
+ TEST_RUN(gl_basic, linux_gles2_rgba);
+ TEST_RUN(gl_basic, linux_gles2_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, wayland_gles20);
+ TEST_RUN(gl_basic, linux_gles20);
- TEST_RUN(gl_basic, wayland_gles3_rgb);
- TEST_RUN(gl_basic, wayland_gles3_rgba);
- TEST_RUN(gl_basic, wayland_gles3_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles3_rgb);
+ TEST_RUN(gl_basic, linux_gles3_rgba);
+ TEST_RUN(gl_basic, linux_gles3_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, wayland_gles30);
+ TEST_RUN(gl_basic, linux_gles30);
}
#endif // WAFFLE_HAS_WAYLAND
@@ -1069,86 +989,6 @@ TEST(gl_basic, x11_egl_gl_fwdcompat_bad_attribute)
.expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
}
-TEST(gl_basic, x11_egl_gles1_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1);
-}
-
-TEST(gl_basic, x11_egl_gles1_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .alpha=true);
-}
-
-TEST(gl_basic, x11_egl_gles10)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .version=10,
- .alpha=true);
-}
-
-TEST(gl_basic, x11_egl_gles11)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .version=11,
- .alpha=true);
-}
-
-TEST(gl_basic, x11_egl_gles1_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
-TEST(gl_basic, x11_egl_gles2_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2);
-}
-
-TEST(gl_basic, x11_egl_gles2_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .alpha=true);
-}
-
-TEST(gl_basic, x11_egl_gles20)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .version=20);
-}
-
-TEST(gl_basic, x11_egl_gles2_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
-TEST(gl_basic, x11_egl_gles3_rgb)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3);
-}
-
-TEST(gl_basic, x11_egl_gles3_rgba)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .alpha=true);
-}
-
-TEST(gl_basic, x11_egl_gles30)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .version=30);
-}
-
-TEST(gl_basic, x11_egl_gles3_fwdcompat_bad_attribute)
-{
- gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3,
- .forward_compatible=true,
- .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE);
-}
-
static void
testsuite_x11_egl(void)
{
@@ -1189,24 +1029,24 @@ testsuite_x11_egl(void)
TEST_RUN(gl_basic, linux_gl42_compat);
TEST_RUN(gl_basic, linux_gl43_compat);
- TEST_RUN(gl_basic, x11_egl_gles1_rgb);
- TEST_RUN(gl_basic, x11_egl_gles1_rgba);
- TEST_RUN(gl_basic, x11_egl_gles1_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles1_rgb);
+ TEST_RUN(gl_basic, linux_gles1_rgba);
+ TEST_RUN(gl_basic, linux_gles1_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, x11_egl_gles10);
- TEST_RUN(gl_basic, x11_egl_gles11);
+ TEST_RUN(gl_basic, linux_gles10);
+ TEST_RUN(gl_basic, linux_gles11);
- TEST_RUN(gl_basic, x11_egl_gles2_rgb);
- TEST_RUN(gl_basic, x11_egl_gles2_rgba);
- TEST_RUN(gl_basic, x11_egl_gles2_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles2_rgb);
+ TEST_RUN(gl_basic, linux_gles2_rgba);
+ TEST_RUN(gl_basic, linux_gles2_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, x11_egl_gles20);
+ TEST_RUN(gl_basic, linux_gles20);
- TEST_RUN(gl_basic, x11_egl_gles3_rgb);
- TEST_RUN(gl_basic, x11_egl_gles3_rgba);
- TEST_RUN(gl_basic, x11_egl_gles3_fwdcompat_bad_attribute);
+ TEST_RUN(gl_basic, linux_gles3_rgb);
+ TEST_RUN(gl_basic, linux_gles3_rgba);
+ TEST_RUN(gl_basic, linux_gles3_fwdcompat_bad_attribute);
- TEST_RUN(gl_basic, x11_egl_gles30);
+ TEST_RUN(gl_basic, linux_gles30);
}
#endif // WAFFLE_HAS_X11_EGL
--
2.0.2
More information about the waffle
mailing list