[mutter] tests/cogl: Migrate just-vertex-shader



commit a3b21188c96c4af78ecc6d1fdb5fe81a51223d85
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 19:37:14 2022 +0200

    tests/cogl: Migrate just-vertex-shader
    
    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-just-vertex-shader.c             | 11 ++++++-----
 5 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 6957bc0a3c..2eb5251e39 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-just-vertex-shader.c',
   'test-pipeline-user-matrix.c',
   'test-pipeline-uniforms.c',
   'test-pixel-buffer.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index a52c4be1ee..2371b9786d 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -87,7 +87,6 @@ main (int argc, char **argv)
 
   ADD_TEST (test_primitive, 0, 0);
 
-  ADD_TEST (test_just_vertex_shader, 0, 0);
   ADD_TEST (test_pipeline_uniforms, 0, 0);
   ADD_TEST (test_snippets, 0, 0);
   ADD_TEST (test_custom_attributes, 0, 0);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 7ec4adbe71..952919b37a 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -20,7 +20,6 @@ void test_read_texture_formats (void);
 void test_write_texture_formats (void);
 void test_alpha_textures (void);
 void test_primitive (void);
-void test_just_vertex_shader (void);
 void test_pipeline_uniforms (void);
 void test_snippets (void);
 void test_custom_attributes (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index fa350fbd4c..ce120451b8 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -5,6 +5,7 @@ cogl_tests = [
   'test-depth-test',
   'test-color-hsl',
   'test-backface-culling',
+  'test-just-vertex-shader',
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-just-vertex-shader.c b/src/tests/cogl/conform/test-just-vertex-shader.c
similarity index 96%
rename from cogl/tests/conform/test-just-vertex-shader.c
rename to src/tests/cogl/conform/test-just-vertex-shader.c
index 2e9cab0e80..4779d8d0a2 100644
--- a/cogl/tests/conform/test-just-vertex-shader.c
+++ b/src/tests/cogl/conform/test-just-vertex-shader.c
@@ -1,11 +1,8 @@
-#define COGL_VERSION_MIN_REQUIRED COGL_VERSION_1_0
-
 #include <cogl/cogl.h>
 
 #include <string.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 typedef struct _TestState
 {
@@ -100,7 +97,7 @@ validate_result (CoglFramebuffer *framebuffer)
   test_utils_check_pixel (framebuffer, 75, 25, 0x00ff0000);
 }
 
-void
+static void
 test_just_vertex_shader (void)
 {
   TestState state;
@@ -118,3 +115,7 @@ test_just_vertex_shader (void)
   if (cogl_test_verbose ())
     g_print ("OK\n");
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/just-vertex-shader", test_just_vertex_shader);
+)


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