[mutter] tests/cogl: Migrate premult test



commit a53fdfb73353f7eaa2c3234211590f705d60d656
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 19:52:48 2022 +0200

    tests/cogl: Migrate premult 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-premult.c | 8 +++++---
 5 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 8a2b36e89c..ff606e3fc6 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-premult.c',
   'test-snippets.c',
   'test-wrap-modes.c',
   'test-sub-texture.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 259658b116..8d9e8250fd 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -59,7 +59,6 @@ main (int argc, char **argv)
   UNPORTED_TEST (test_object);
   UNPORTED_TEST (test_fixed);
   UNPORTED_TEST (test_materials);
-  ADD_TEST (test_premult, 0, 0);
   UNPORTED_TEST (test_readpixels);
   ADD_TEST (test_layer_remove, 0, 0);
 
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 782d05c7d8..5e6c7b9aba 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -1,7 +1,6 @@
 #ifndef COGL_TEST_DECLARATIONS_H
 #define COGL_TEST_DECLARATIONS_H
 
-void test_premult (void);
 void test_path (void);
 void test_path_clip (void);
 void test_depth_test (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 6540d84c33..a275889cd8 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -9,6 +9,7 @@ cogl_tests = [
   'test-pipeline-user-matrix',
   'test-pipeline-uniforms',
   'test-pixel-buffer',
+  'test-premult',
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-premult.c b/src/tests/cogl/conform/test-premult.c
similarity index 98%
rename from cogl/tests/conform/test-premult.c
rename to src/tests/cogl/conform/test-premult.c
index cd0687d94e..690968b549 100644
--- a/cogl/tests/conform/test-premult.c
+++ b/src/tests/cogl/conform/test-premult.c
@@ -2,8 +2,7 @@
 
 #include <string.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 #define QUAD_WIDTH 32
 
@@ -110,7 +109,7 @@ check_texture (CoglPipeline *pipeline,
   test_utils_check_pixel (test_fb, x * QUAD_WIDTH + QUAD_WIDTH / 2, y * QUAD_WIDTH + QUAD_WIDTH / 2, 
expected_result);
 }
 
-void
+static void
 test_premult (void)
 {
   CoglPipeline *pipeline;
@@ -284,3 +283,6 @@ test_premult (void)
     g_print ("OK\n");
 }
 
+COGL_TEST_SUITE (
+  g_test_add_func ("/premult", test_premult);
+)


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