[mutter] tests/cogl: Migrate color-hsl test



commit 3839fb49cb17e39dfe3c29dacaa05815317e7e1f
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 19:19:29 2022 +0200

    tests/cogl: Migrate color-hsl 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-color-hsl.c | 9 ++++++---
 5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 2b0026c6f5..546065fe4e 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-color-hsl.c',
   'test-backface-culling.c',
   'test-just-vertex-shader.c',
   'test-pipeline-user-matrix.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index a55e09c7b6..277e246bd3 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -129,8 +129,6 @@ main (int argc, char **argv)
 
   UNPORTED_TEST (test_viewport);
 
-  ADD_TEST (test_color_hsl, 0, 0);
-
   ADD_TEST (test_fence, TEST_REQUIREMENT_FENCE, 0);
 
   ADD_TEST (test_texture_no_allocate, 0, 0);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 5f238dd37a..7ec4adbe71 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -42,7 +42,6 @@ void test_pipeline_shader_state (void);
 void test_gles2_context (void);
 void test_gles2_context_fbo (void);
 void test_gles2_context_copy_tex_image (void);
-void test_color_hsl (void);
 void test_fence (void);
 void test_texture_no_allocate (void);
 void test_texture_rg (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 6721037219..fa81431ed6 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -3,6 +3,7 @@ cogl_tests = [
   'test-blend-strings',
   'test-blend',
   'test-depth-test',
+  'test-color-hsl',
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-color-hsl.c b/src/tests/cogl/conform/test-color-hsl.c
similarity index 92%
rename from cogl/tests/conform/test-color-hsl.c
rename to src/tests/cogl/conform/test-color-hsl.c
index fa3af53347..4c422ddb10 100644
--- a/cogl/tests/conform/test-color-hsl.c
+++ b/src/tests/cogl/conform/test-color-hsl.c
@@ -3,12 +3,11 @@
 
 #include <cogl/cogl.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 #define TEST_CASE_EPSILON 0.0001
 
-void
+static void
 test_color_hsl (void)
 {
   CoglColor color;
@@ -44,3 +43,7 @@ test_color_hsl (void)
   if (cogl_test_verbose ())
     g_print ("OK\n");
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/color/hsl", test_color_hsl);
+)


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