[mutter] tests/cogl: Migrate npot texture test



commit 629c23b2290c35954d2f499c247d8741f127aef1
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 22:01:03 2022 +0200

    tests/cogl: Migrate npot texture 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                     | 1 -
 cogl/tests/conform/test-declarations.h                     | 1 -
 src/tests/cogl/conform/meson.build                         | 1 +
 {cogl/tests => src/tests/cogl}/conform/test-npot-texture.c | 8 +++++---
 5 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index f105f41289..b9abea6493 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-npot-texture.c',
   'test-alpha-textures.c',
   'test-texture-get-set-data.c',
   'test-framebuffer-get-bits.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index f5960a3046..1ef3bdc966 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -61,7 +61,6 @@ main (int argc, char **argv)
   UNPORTED_TEST (test_materials);
   UNPORTED_TEST (test_readpixels);
 
-  ADD_TEST (test_npot_texture, 0, 0);
   UNPORTED_TEST (test_multitexture);
   UNPORTED_TEST (test_texture_mipmaps);
   UNPORTED_TEST (test_texture_rectangle);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index b0323fb009..2396f08c39 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_npot_texture (void);
 void test_texture_get_set_data (void);
 void test_alpha_textures (void);
 void test_framebuffer_get_bits (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index de4f56f053..b9529278e4 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -28,6 +28,7 @@ cogl_tests = [
   [ 'test-layer-remove', [] ],
   [ 'test-alpha-test', [] ],
   [ 'test-map-buffer-range', [] ],
+  [ 'test-npot-texture', [] ],
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-npot-texture.c b/src/tests/cogl/conform/test-npot-texture.c
similarity index 97%
rename from cogl/tests/conform/test-npot-texture.c
rename to src/tests/cogl/conform/test-npot-texture.c
index 551f72b7b6..ce5d3e29b4 100644
--- a/cogl/tests/conform/test-npot-texture.c
+++ b/src/tests/cogl/conform/test-npot-texture.c
@@ -2,8 +2,7 @@
 
 #include <string.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 /* Non-power-of-two sized texture that should cause slicing */
 #define TEXTURE_SIZE        384
@@ -142,7 +141,7 @@ paint (void)
   cogl_object_unref (texture);
 }
 
-void
+static void
 test_npot_texture (void)
 {
   cogl_framebuffer_orthographic (test_fb,
@@ -159,3 +158,6 @@ test_npot_texture (void)
     g_print ("OK\n");
 }
 
+COGL_TEST_SUITE (
+  g_test_add_func ("/npot-texture", test_npot_texture);
+)


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