[mutter] tests/cogl: Migrate custom attributes test



commit fd9988406309e05234e1ebca82f65a17098195da
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 20:01:08 2022 +0200

    tests/cogl: Migrate custom attributes 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-custom-attributes.c | 9 ++++++---
 5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index f4e0c1aa8d..72e4a21f0a 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-custom-attributes.c',
   'test-offscreen.c',
   'test-journal.c',
   'test-primitive.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 997335826b..c44958ea1d 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -80,8 +80,6 @@ main (int argc, char **argv)
 
   ADD_TEST (test_primitive, 0, 0);
 
-  ADD_TEST (test_custom_attributes, 0, 0);
-
   ADD_TEST (test_offscreen, 0, 0);
   ADD_TEST (test_journal_unref_flush, 0, 0);
   ADD_TEST (test_framebuffer_get_bits,
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index e03b427df2..41fa469ba8 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -13,7 +13,6 @@ void test_read_texture_formats (void);
 void test_write_texture_formats (void);
 void test_alpha_textures (void);
 void test_primitive (void);
-void test_custom_attributes (void);
 void test_offscreen (void);
 void test_journal_unref_flush (void);
 void test_framebuffer_get_bits (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 08ec157616..d0032955de 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -13,6 +13,7 @@ cogl_tests = [
   'test-snippets',
   'test-wrap-modes',
   'test-sub-texture',
+  'test-custom-attributes',
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-custom-attributes.c b/src/tests/cogl/conform/test-custom-attributes.c
similarity index 98%
rename from cogl/tests/conform/test-custom-attributes.c
rename to src/tests/cogl/conform/test-custom-attributes.c
index dfb7cbdb2b..0dd32288d3 100644
--- a/cogl/tests/conform/test-custom-attributes.c
+++ b/src/tests/cogl/conform/test-custom-attributes.c
@@ -2,8 +2,7 @@
 
 #include <string.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 typedef struct _TestState
 {
@@ -273,7 +272,7 @@ paint (TestState *state)
   test_short_verts (state, 0, 20);
 }
 
-void
+static void
 test_custom_attributes (void)
 {
   CoglSnippet *snippet;
@@ -300,3 +299,7 @@ test_custom_attributes (void)
   if (cogl_test_verbose ())
     g_print ("OK\n");
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/custom-attributes", test_custom_attributes);
+)


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