[mutter] tests/cogl: Migrate atlas-migration test



commit eaed0e4b4663f959af30d9d65f52c61ecf6d6a74
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 18:58:04 2022 +0200

    tests/cogl: Migrate atlas-migration 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-atlas-migration.c | 9 ++++++---
 5 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index e20cd04ed9..af621267ce 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-atlas-migration.c',
   'test-blend-strings.c',
   'test-blend.c',
   'test-depth-test.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 3a0844a4b7..b17497e21a 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -81,7 +81,6 @@ main (int argc, char **argv)
   ADD_TEST (test_wrap_modes, 0, 0);
   UNPORTED_TEST (test_texture_pixmap_x11);
   ADD_TEST (test_texture_get_set_data, 0, 0);
-  ADD_TEST (test_atlas_migration, 0, 0);
   ADD_TEST (test_read_texture_formats, 0, TEST_KNOWN_FAILURE);
   ADD_TEST (test_write_texture_formats, 0, 0);
   ADD_TEST (test_alpha_textures, 0, 0);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 58e065873c..5116f82b7f 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -18,7 +18,6 @@ void test_pixel_buffer_set_data (void);
 void test_pixel_buffer_sub_region (void);
 void test_wrap_modes (void);
 void test_texture_get_set_data (void);
-void test_atlas_migration (void);
 void test_read_texture_formats (void);
 void test_write_texture_formats (void);
 void test_alpha_textures (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 2377d9f51b..15daad65ac 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -1,4 +1,5 @@
 cogl_tests = [
+  'test-atlas-migration',
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-atlas-migration.c b/src/tests/cogl/conform/test-atlas-migration.c
similarity index 96%
rename from cogl/tests/conform/test-atlas-migration.c
rename to src/tests/cogl/conform/test-atlas-migration.c
index 877fb37d6d..c1910bc4eb 100644
--- a/cogl/tests/conform/test-atlas-migration.c
+++ b/src/tests/cogl/conform/test-atlas-migration.c
@@ -1,7 +1,6 @@
 #include <cogl/cogl.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 #define N_TEXTURES 128
 
@@ -112,7 +111,7 @@ verify_texture (CoglTexture *texture, int size)
   g_free (data);
 }
 
-void
+static void
 test_atlas_migration (void)
 {
   CoglTexture *textures[N_TEXTURES];
@@ -144,3 +143,7 @@ test_atlas_migration (void)
   if (cogl_test_verbose ())
     g_print ("OK\n");
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/atlas-migration", test_atlas_migration);
+)


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