From 0a841ce846602e559768d06b565650daf1a0c771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 4 Aug 2022 21:55:14 +0200 Subject: [PATCH] tests/cogl: Migrate alpha test test Part-of: --- 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-alpha-test.c | 8 +++++--- 5 files changed, 6 insertions(+), 7 deletions(-) rename {cogl/tests => src/tests/cogl}/conform/test-alpha-test.c (95%) diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build index ec685171a..32b98cdf9 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-alpha-test.c', 'test-map-buffer-range.c', 'test-npot-texture.c', 'test-alpha-textures.c', diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c index 7b02a59b9..559ceed53 100644 --- a/cogl/tests/conform/test-conform-main.c +++ b/cogl/tests/conform/test-conform-main.c @@ -77,8 +77,6 @@ main (int argc, char **argv) TEST_REQUIREMENT_GL, 0); - ADD_TEST (test_alpha_test, 0, 0); - ADD_TEST (test_map_buffer_range, TEST_REQUIREMENT_MAP_WRITE, 0); ADD_TEST (test_primitive_and_journal, 0, 0); diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h index 72e3de01d..4b5291103 100644 --- a/cogl/tests/conform/test-declarations.h +++ b/cogl/tests/conform/test-declarations.h @@ -9,7 +9,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_alpha_test (void); void test_map_buffer_range (void); void test_primitive_and_journal (void); void test_copy_replace_texture (void); diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build index 5eba257bb..3fe80658f 100644 --- a/src/tests/cogl/conform/meson.build +++ b/src/tests/cogl/conform/meson.build @@ -26,6 +26,7 @@ cogl_tests = [ [ 'test-point-sprite-known-failure', ['gl', 'gl3', 'gles2'] ], [ 'test-no-gl-header', [] ], [ 'test-layer-remove', [] ], + [ 'test-alpha-test', [] ], ] cogl_test_conformance_includes = [ diff --git a/cogl/tests/conform/test-alpha-test.c b/src/tests/cogl/conform/test-alpha-test.c similarity index 95% rename from cogl/tests/conform/test-alpha-test.c rename to src/tests/cogl/conform/test-alpha-test.c index c46f7c218..746852953 100644 --- a/cogl/tests/conform/test-alpha-test.c +++ b/src/tests/cogl/conform/test-alpha-test.c @@ -1,8 +1,7 @@ #include #include -#include "test-declarations.h" -#include "test-utils.h" +#include "tests/cogl-test-utils.h" static CoglTexture2D * create_texture (CoglContext *context) @@ -21,7 +20,7 @@ create_texture (CoglContext *context) NULL /* error */); } -void +static void test_alpha_test (void) { CoglTexture *tex = create_texture (test_ctx); @@ -72,3 +71,6 @@ test_alpha_test (void) g_print ("OK\n"); } +COGL_TEST_SUITE ( + g_test_add_func ("/alpha-test", test_alpha_test); +)