From ae9b4a1bcfdd5cb3e28dcb56b204a8cfd7e957c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 4 Aug 2022 20:26:24 +0200 Subject: [PATCH] tests/cogl: Migrate write texture formats test Part-of: --- 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-write-texture-formats.c | 9 ++++++--- 5 files changed, 7 insertions(+), 6 deletions(-) rename {cogl/tests => src/tests/cogl}/conform/test-write-texture-formats.c (97%) diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build index 0d8dbee8e..0b1399798 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-write-texture-formats.c', 'test-point-size.c', 'test-point-size-attribute.c', 'test-point-sprite.c', diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c index 97dd465b6..1e8132f94 100644 --- a/cogl/tests/conform/test-conform-main.c +++ b/cogl/tests/conform/test-conform-main.c @@ -68,7 +68,6 @@ main (int argc, char **argv) UNPORTED_TEST (test_texture_rectangle); UNPORTED_TEST (test_texture_pixmap_x11); ADD_TEST (test_texture_get_set_data, 0, 0); - ADD_TEST (test_write_texture_formats, 0, 0); ADD_TEST (test_alpha_textures, 0, 0); UNPORTED_TEST (test_vertex_buffer_contiguous); diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h index 0cbdbb615..933fc26df 100644 --- a/cogl/tests/conform/test-declarations.h +++ b/cogl/tests/conform/test-declarations.h @@ -8,7 +8,6 @@ void test_backface_culling (void); void test_layer_remove (void); void test_npot_texture (void); void test_texture_get_set_data (void); -void test_write_texture_formats (void); void test_alpha_textures (void); void test_framebuffer_get_bits (void); void test_point_size (void); diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build index 23837e92e..d5bb35884 100644 --- a/src/tests/cogl/conform/meson.build +++ b/src/tests/cogl/conform/meson.build @@ -19,6 +19,7 @@ cogl_tests = [ [ 'test-primitive', [] ], [ 'test-sparse-pipeline', [] ], [ 'test-read-texture-formats', ['gl', 'gl3'] ], + [ 'test-write-texture-formats', [] ], ] cogl_test_conformance_includes = [ diff --git a/cogl/tests/conform/test-write-texture-formats.c b/src/tests/cogl/conform/test-write-texture-formats.c similarity index 97% rename from cogl/tests/conform/test-write-texture-formats.c rename to src/tests/cogl/conform/test-write-texture-formats.c index ca8015771..6019c02f3 100644 --- a/cogl/tests/conform/test-write-texture-formats.c +++ b/src/tests/cogl/conform/test-write-texture-formats.c @@ -1,8 +1,7 @@ #include #include -#include "test-declarations.h" -#include "test-utils.h" +#include "tests/cogl-test-utils.h" /* * This tests writing data to an RGBA texture in all of the available @@ -131,7 +130,7 @@ test_write_int (CoglContext *context, cogl_object_unref (texture); } -void +static void test_write_texture_formats (void) { test_write_byte (test_ctx, COGL_PIXEL_FORMAT_A_8, 0x34, 0x00000034); @@ -183,3 +182,7 @@ test_write_texture_formats (void) if (cogl_test_verbose ()) g_print ("OK\n"); } + +COGL_TEST_SUITE ( + g_test_add_func ("/write-texture-formats ", test_write_texture_formats); +)