[mutter] tests/cogl: Migrate backface-culling test



commit f3a821b4cdab29c6ee2313abacad09537c1826af
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 19:34:12 2022 +0200

    tests/cogl: Migrate backface-culling 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                         |  1 -
 src/tests/cogl/conform/meson.build                             |  1 +
 {cogl/tests => src/tests/cogl}/conform/test-backface-culling.c | 10 +++++-----
 4 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 546065fe4e..6957bc0a3c 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-backface-culling.c',
   'test-just-vertex-shader.c',
   'test-pipeline-user-matrix.c',
   'test-pipeline-uniforms.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 9dfffa5e23..a52c4be1ee 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -62,7 +62,6 @@ main (int argc, char **argv)
   ADD_TEST (test_pipeline_user_matrix, 0, 0);
   ADD_TEST (test_premult, 0, 0);
   UNPORTED_TEST (test_readpixels);
-  ADD_TEST (test_backface_culling, 0, 0);
   ADD_TEST (test_layer_remove, 0, 0);
 
   ADD_TEST (test_sparse_pipeline, 0, 0);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index fa81431ed6..fa350fbd4c 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -4,6 +4,7 @@ cogl_tests = [
   'test-blend',
   'test-depth-test',
   'test-color-hsl',
+  'test-backface-culling',
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-backface-culling.c b/src/tests/cogl/conform/test-backface-culling.c
similarity index 98%
rename from cogl/tests/conform/test-backface-culling.c
rename to src/tests/cogl/conform/test-backface-culling.c
index 508d2da912..6a3f821c51 100644
--- a/cogl/tests/conform/test-backface-culling.c
+++ b/src/tests/cogl/conform/test-backface-culling.c
@@ -1,11 +1,8 @@
-#define COGL_VERSION_MIN_REQUIRED COGL_VERSION_1_0
-
 #include <cogl/cogl.h>
 
 #include <string.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 /* Size the texture so that it is just off a power of two to encourage
    it so use software tiling when NPOTs aren't available */
@@ -286,7 +283,7 @@ make_texture (void)
   return tex;
 }
 
-void
+static void
 test_backface_culling (void)
 {
   TestState state;
@@ -316,3 +313,6 @@ test_backface_culling (void)
     g_print ("OK\n");
 }
 
+COGL_TEST_SUITE (
+  g_test_add_func ("/backface-culling", test_backface_culling);
+)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]