[mutter] tests/cogl: Migrate point size attribute tests



commit 41e5ee63d30c8d8ed1bc35a8f0c7a06123d9f377
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 20:31:32 2022 +0200

    tests/cogl: Migrate point size attribute tests
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>

 cogl/tests/conform/meson.build                               |  1 -
 cogl/tests/conform/test-conform-main.c                       |  4 ----
 cogl/tests/conform/test-declarations.h                       |  2 --
 src/tests/cogl/conform/meson.build                           |  1 +
 .../tests/cogl}/conform/test-point-size-attribute.c          | 12 ++++++++----
 5 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index d4b9d33136..1aa0a3bbe6 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-point-size-attribute.c',
   'test-point-sprite.c',
   'test-no-gl-header.c',
   'test-version.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index c871ddea4f..3bc98ba184 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -78,10 +78,6 @@ main (int argc, char **argv)
             TEST_REQUIREMENT_GL,
             0);
 
-  ADD_TEST (test_point_size_attribute,
-            0, 0);
-  ADD_TEST (test_point_size_attribute_snippet,
-            0, 0);
   ADD_TEST (test_point_sprite,
             0, 0);
   ADD_TEST (test_point_sprite_orientation,
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 6346349371..492cd22431 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -10,8 +10,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_point_size_attribute (void);
-void test_point_size_attribute_snippet (void);
 void test_point_sprite (void);
 void test_point_sprite_orientation (void);
 void test_point_sprite_glsl (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 2e65da6f07..22b52ed72a 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -21,6 +21,7 @@ cogl_tests = [
   [ 'test-read-texture-formats', ['gl', 'gl3'] ],
   [ 'test-write-texture-formats', [] ],
   [ 'test-point-size', [] ],
+  [ 'test-point-size-attribute', [] ],
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-point-size-attribute.c 
b/src/tests/cogl/conform/test-point-size-attribute.c
similarity index 95%
rename from cogl/tests/conform/test-point-size-attribute.c
rename to src/tests/cogl/conform/test-point-size-attribute.c
index b5aeec69b3..c177bce62e 100644
--- a/cogl/tests/conform/test-point-size-attribute.c
+++ b/src/tests/cogl/conform/test-point-size-attribute.c
@@ -1,7 +1,6 @@
 #include <cogl/cogl.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 /* This test assumes the GL driver supports point sizes up to 16
    pixels. Cogl should probably have some way of querying the size so
@@ -139,7 +138,7 @@ do_test (const char *attribute_name,
     g_print ("OK\n");
 }
 
-void
+static void
 test_point_size_attribute (void)
 {
   do_test ("cogl_point_size_in", NULL);
@@ -161,8 +160,13 @@ setup_snippet (CoglPipeline *pipeline)
   cogl_object_unref (snippet);
 }
 
-void
+static void
 test_point_size_attribute_snippet (void)
 {
   do_test ("my_super_duper_point_size_attrib", setup_snippet);
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/point-size/attribute", test_point_size_attribute);
+  g_test_add_func ("/point-size/attribute-snippet", test_point_size_attribute_snippet);
+)


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