[mutter] tests/cogl: Migrate layer remove test



commit 5b0fa9cff4d0cae92a8ff535e9324125f5deeab2
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 20:44:58 2022 +0200

    tests/cogl: Migrate layer remove 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 -
 cogl/tests/conform/test-declarations.h                     | 1 -
 src/tests/cogl/conform/meson.build                         | 1 +
 {cogl/tests => src/tests/cogl}/conform/test-layer-remove.c | 9 ++++++---
 5 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 708fc679dc..ec685171a7 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-layer-remove.c',
   'test-alpha-test.c',
   'test-map-buffer-range.c',
   'test-npot-texture.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 672d3d51f2..7b02a59b9e 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -60,7 +60,6 @@ main (int argc, char **argv)
   UNPORTED_TEST (test_fixed);
   UNPORTED_TEST (test_materials);
   UNPORTED_TEST (test_readpixels);
-  ADD_TEST (test_layer_remove, 0, 0);
 
   ADD_TEST (test_npot_texture, 0, 0);
   UNPORTED_TEST (test_multitexture);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index c2f74e2660..72e3de01d9 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -5,7 +5,6 @@ void test_path (void);
 void test_path_clip (void);
 void test_depth_test (void);
 void test_backface_culling (void);
-void test_layer_remove (void);
 void test_npot_texture (void);
 void test_texture_get_set_data (void);
 void test_alpha_textures (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index ea59c75512..5eba257bb6 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -25,6 +25,7 @@ cogl_tests = [
   [ 'test-point-sprite', [] ],
   [ 'test-point-sprite-known-failure', ['gl', 'gl3', 'gles2'] ],
   [ 'test-no-gl-header', [] ],
+  [ 'test-layer-remove', [] ],
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-layer-remove.c b/src/tests/cogl/conform/test-layer-remove.c
similarity index 97%
rename from cogl/tests/conform/test-layer-remove.c
rename to src/tests/cogl/conform/test-layer-remove.c
index fbfdd64733..bfc201c7f3 100644
--- a/cogl/tests/conform/test-layer-remove.c
+++ b/src/tests/cogl/conform/test-layer-remove.c
@@ -1,7 +1,6 @@
 #include <cogl/cogl.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 #define TEST_SQUARE_SIZE 10
 
@@ -50,7 +49,7 @@ test_color (CoglPipeline *pipeline,
                           color);
 }
 
-void
+static void
 test_layer_remove (void)
 {
   CoglPipeline *pipeline0, *pipeline1;
@@ -144,3 +143,7 @@ test_layer_remove (void)
   if (cogl_test_verbose ())
     g_print ("OK\n");
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/layer/remove", test_layer_remove);
+)


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