[mutter] tests/cogl: Migrate alpha test test



commit 0a841ce846602e559768d06b565650daf1a0c771
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 21:55:14 2022 +0200

    tests/cogl: Migrate alpha test 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 +
 {cogl/tests => src/tests/cogl}/conform/test-alpha-test.c | 8 +++++---
 5 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index ec685171a7..32b98cdf95 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-alpha-test.c',
   'test-map-buffer-range.c',
   'test-npot-texture.c',
   'test-alpha-textures.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 7b02a59b9e..559ceed536 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -77,8 +77,6 @@ main (int argc, char **argv)
             TEST_REQUIREMENT_GL,
             0);
 
-  ADD_TEST (test_alpha_test, 0, 0);
-
   ADD_TEST (test_map_buffer_range, TEST_REQUIREMENT_MAP_WRITE, 0);
 
   ADD_TEST (test_primitive_and_journal, 0, 0);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 72e3de01d9..4b52911038 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -9,7 +9,6 @@ void test_npot_texture (void);
 void test_texture_get_set_data (void);
 void test_alpha_textures (void);
 void test_framebuffer_get_bits (void);
-void test_alpha_test (void);
 void test_map_buffer_range (void);
 void test_primitive_and_journal (void);
 void test_copy_replace_texture (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 5eba257bb6..3fe80658f4 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -26,6 +26,7 @@ cogl_tests = [
   [ 'test-point-sprite-known-failure', ['gl', 'gl3', 'gles2'] ],
   [ 'test-no-gl-header', [] ],
   [ 'test-layer-remove', [] ],
+  [ 'test-alpha-test', [] ],
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-alpha-test.c b/src/tests/cogl/conform/test-alpha-test.c
similarity index 95%
rename from cogl/tests/conform/test-alpha-test.c
rename to src/tests/cogl/conform/test-alpha-test.c
index c46f7c218a..746852953c 100644
--- a/cogl/tests/conform/test-alpha-test.c
+++ b/src/tests/cogl/conform/test-alpha-test.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"
 
 static CoglTexture2D *
 create_texture (CoglContext *context)
@@ -21,7 +20,7 @@ create_texture (CoglContext *context)
                                         NULL /* error */);
 }
 
-void
+static void
 test_alpha_test (void)
 {
   CoglTexture *tex = create_texture (test_ctx);
@@ -72,3 +71,6 @@ test_alpha_test (void)
     g_print ("OK\n");
 }
 
+COGL_TEST_SUITE (
+  g_test_add_func ("/alpha-test", test_alpha_test);
+)


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