[mutter] tests/cogl: Migrate write texture formats test



commit ae9b4a1bcfdd5cb3e28dcb56b204a8cfd7e957c7
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 20:26:24 2022 +0200

    tests/cogl: Migrate write texture formats 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 +
 .../tests/cogl}/conform/test-write-texture-formats.c             | 9 ++++++---
 5 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 0d8dbee8ea..0b13997987 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-write-texture-formats.c',
   'test-point-size.c',
   'test-point-size-attribute.c',
   'test-point-sprite.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 97dd465b67..1e8132f94a 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -68,7 +68,6 @@ main (int argc, char **argv)
   UNPORTED_TEST (test_texture_rectangle);
   UNPORTED_TEST (test_texture_pixmap_x11);
   ADD_TEST (test_texture_get_set_data, 0, 0);
-  ADD_TEST (test_write_texture_formats, 0, 0);
   ADD_TEST (test_alpha_textures, 0, 0);
 
   UNPORTED_TEST (test_vertex_buffer_contiguous);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 0cbdbb6155..933fc26df9 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -8,7 +8,6 @@ void test_backface_culling (void);
 void test_layer_remove (void);
 void test_npot_texture (void);
 void test_texture_get_set_data (void);
-void test_write_texture_formats (void);
 void test_alpha_textures (void);
 void test_framebuffer_get_bits (void);
 void test_point_size (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 23837e92e3..d5bb358841 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -19,6 +19,7 @@ cogl_tests = [
   [ 'test-primitive', [] ],
   [ 'test-sparse-pipeline', [] ],
   [ 'test-read-texture-formats', ['gl', 'gl3'] ],
+  [ 'test-write-texture-formats', [] ],
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-write-texture-formats.c 
b/src/tests/cogl/conform/test-write-texture-formats.c
similarity index 97%
rename from cogl/tests/conform/test-write-texture-formats.c
rename to src/tests/cogl/conform/test-write-texture-formats.c
index ca8015771a..6019c02f3d 100644
--- a/cogl/tests/conform/test-write-texture-formats.c
+++ b/src/tests/cogl/conform/test-write-texture-formats.c
@@ -1,8 +1,7 @@
 #include <cogl/cogl.h>
 #include <stdarg.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 /*
  * This tests writing data to an RGBA texture in all of the available
@@ -131,7 +130,7 @@ test_write_int (CoglContext *context,
   cogl_object_unref (texture);
 }
 
-void
+static void
 test_write_texture_formats (void)
 {
   test_write_byte (test_ctx, COGL_PIXEL_FORMAT_A_8, 0x34, 0x00000034);
@@ -183,3 +182,7 @@ test_write_texture_formats (void)
   if (cogl_test_verbose ())
     g_print ("OK\n");
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/write-texture-formats ", test_write_texture_formats);
+)


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