[mutter] tests/cogl: Migrate copy/replace texture test



commit 68dcde0bdb3312d53995312b3ecb6d4ba3c1801a
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 22:19:01 2022 +0200

    tests/cogl: Migrate copy/replace texture 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 +
 .../tests => src/tests/cogl}/conform/test-copy-replace-texture.c | 9 ++++++---
 5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 29ecdbd70e..f98d1ee4ef 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-copy-replace-texture.c',
   'test-pipeline-cache-unrefs-texture.c',
   'test-texture-no-allocate.c',
   'test-pipeline-shader-state.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index cfed8f7f2c..5e4dcedbc1 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -70,8 +70,6 @@ main (int argc, char **argv)
   UNPORTED_TEST (test_vertex_buffer_interleved);
   UNPORTED_TEST (test_vertex_buffer_mutability);
 
-  ADD_TEST (test_copy_replace_texture, 0, 0);
-
   ADD_TEST (test_pipeline_cache_unrefs_texture, 0, 0);
   ADD_TEST (test_pipeline_shader_state, 0, 0);
 
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 8c815b71a2..339bf7d180 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_copy_replace_texture (void);
 void test_pipeline_cache_unrefs_texture (void);
 void test_pipeline_shader_state (void);
 void test_gles2_context (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index eab077b2c1..097d10130c 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -33,6 +33,7 @@ cogl_tests = [
   [ 'test-texture-get-set-data', [] ],
   [ 'test-framebuffer-get-bits', [] ],
   [ 'test-primitive-and-journal', [] ],
+  [ 'test-copy-replace-texture', [] ],
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-copy-replace-texture.c 
b/src/tests/cogl/conform/test-copy-replace-texture.c
similarity index 96%
rename from cogl/tests/conform/test-copy-replace-texture.c
rename to src/tests/cogl/conform/test-copy-replace-texture.c
index 7f0f319d63..9f5408098b 100644
--- a/cogl/tests/conform/test-copy-replace-texture.c
+++ b/src/tests/cogl/conform/test-copy-replace-texture.c
@@ -1,8 +1,7 @@
 #include <cogl/cogl.h>
 #include <string.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 /* Keep track of the number of textures that we've created and are
  * still alive */
@@ -54,7 +53,7 @@ create_texture (void)
   return tex_2d;
 }
 
-void
+static void
 test_copy_replace_texture (void)
 {
   CoglPipeline *pipelines[N_PIPELINES];
@@ -119,3 +118,7 @@ test_copy_replace_texture (void)
   if (cogl_test_verbose ())
     g_print ("OK\n");
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/copy-replace-texture", test_copy_replace_texture);
+)


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