[mutter] tests/cogl: Migrate texture rg test
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests/cogl: Migrate texture rg test
- Date: Mon, 8 Aug 2022 22:13:12 +0000 (UTC)
commit 2b43ff596326dfea21e76abbcb247179d0aa31a2
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Aug 4 22:27:47 2022 +0200
tests/cogl: Migrate texture rg test
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>
cogl/tests/conform/meson.build | 1 -
cogl/tests/conform/test-conform-main.c | 2 --
cogl/tests/conform/test-declarations.h | 1 -
src/tests/cogl/conform/meson.build | 1 +
{cogl/tests => src/tests/cogl}/conform/test-texture-rg.c | 15 ++++++++++++---
5 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index d5ebb67f1a..b1ff85e1df 100644
--- a/cogl/tests/conform/meson.build
+++ b/cogl/tests/conform/meson.build
@@ -1,6 +1,5 @@
cogl_test_conformance_sources = [
'test-conform-main.c',
- 'test-texture-rg.c',
'test-fence.c',
]
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 901e280d30..da214ce212 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -74,8 +74,6 @@ main (int argc, char **argv)
ADD_TEST (test_fence, TEST_REQUIREMENT_FENCE, 0);
- ADD_TEST (test_texture_rg, TEST_REQUIREMENT_TEXTURE_RG, 0);
-
g_printerr ("Unknown test name \"%s\"\n", argv[1]);
return 1;
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 37374b4462..75c568a798 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -9,6 +9,5 @@ void test_gles2_context (void);
void test_gles2_context_fbo (void);
void test_gles2_context_copy_tex_image (void);
void test_fence (void);
-void test_texture_rg (void);
#endif /* COGL_TEST_DECLARATIONS_H */
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 8aa8c4a5ec..1d44f1828d 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -37,6 +37,7 @@ cogl_tests = [
[ 'test-pipeline-cache-unrefs-texture', [] ],
[ 'test-texture-no-allocate', [] ],
[ 'test-pipeline-shader-state', [] ],
+ [ 'test-texture-rg', [] ],
]
cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-texture-rg.c b/src/tests/cogl/conform/test-texture-rg.c
similarity index 89%
rename from cogl/tests/conform/test-texture-rg.c
rename to src/tests/cogl/conform/test-texture-rg.c
index e3ed2b5290..6d476359ec 100644
--- a/cogl/tests/conform/test-texture-rg.c
+++ b/src/tests/cogl/conform/test-texture-rg.c
@@ -2,8 +2,7 @@
#include <string.h>
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
#define TEX_WIDTH 8
#define TEX_HEIGHT 8
@@ -29,7 +28,7 @@ make_texture (void)
NULL);
}
-void
+static void
test_texture_rg (void)
{
CoglPipeline *pipeline;
@@ -37,6 +36,12 @@ test_texture_rg (void)
int fb_width, fb_height;
int x, y;
+ if (!cogl_has_feature (test_ctx, COGL_FEATURE_ID_TEXTURE_RG))
+ {
+ g_test_skip ("Missing TEXTURE_RG feature");
+ return;
+ }
+
fb_width = cogl_framebuffer_get_width (test_fb);
fb_height = cogl_framebuffer_get_height (test_fb);
@@ -73,3 +78,7 @@ test_texture_rg (void)
cogl_object_unref (pipeline);
cogl_object_unref (tex);
}
+
+COGL_TEST_SUITE (
+ g_test_add_func ("/texture/rg", test_texture_rg);
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]