[mutter] tests/cogl: Migrate pipeline shader state test



commit e7f535a21df2d53c65ebcb08c1974ffc63c08cbb
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 22:24:31 2022 +0200

    tests/cogl: Migrate pipeline shader state 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 +
 .../tests/cogl}/conform/test-pipeline-shader-state.c             | 9 ++++++---
 5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 78d543bb03..d5ebb67f1a 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-pipeline-shader-state.c',
   'test-texture-rg.c',
   'test-fence.c',
 ]
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 12868b43b1..901e280d30 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -70,8 +70,6 @@ main (int argc, char **argv)
   UNPORTED_TEST (test_vertex_buffer_interleved);
   UNPORTED_TEST (test_vertex_buffer_mutability);
 
-  ADD_TEST (test_pipeline_shader_state, 0, 0);
-
   UNPORTED_TEST (test_viewport);
 
   ADD_TEST (test_fence, TEST_REQUIREMENT_FENCE, 0);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 46ca6c0375..37374b4462 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -5,7 +5,6 @@ void test_path (void);
 void test_path_clip (void);
 void test_depth_test (void);
 void test_backface_culling (void);
-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);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 8f9b9c8819..8aa8c4a5ec 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -36,6 +36,7 @@ cogl_tests = [
   [ 'test-copy-replace-texture', [] ],
   [ 'test-pipeline-cache-unrefs-texture', [] ],
   [ 'test-texture-no-allocate', [] ],
+  [ 'test-pipeline-shader-state', [] ],
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-pipeline-shader-state.c 
b/src/tests/cogl/conform/test-pipeline-shader-state.c
similarity index 95%
rename from cogl/tests/conform/test-pipeline-shader-state.c
rename to src/tests/cogl/conform/test-pipeline-shader-state.c
index 69e6526f67..c4cfe6fde9 100644
--- a/cogl/tests/conform/test-pipeline-shader-state.c
+++ b/src/tests/cogl/conform/test-pipeline-shader-state.c
@@ -2,10 +2,9 @@
 
 #include <string.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
-void
+static void
 test_pipeline_shader_state (void)
 {
   CoglOffscreen *offscreen;
@@ -92,3 +91,7 @@ test_pipeline_shader_state (void)
   test_utils_check_region (test_fb, 0, 0, width, height,
                            0x0000ffff);
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/pipeline/shader-state", test_pipeline_shader_state);
+)


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