From d066fb5380793caa7d259e71ccca41f0d3b5101a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 4 Aug 2022 22:21:13 +0200 Subject: [PATCH] tests/cogl: Migrate pipeline cache unrefs texture 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 + .../cogl}/conform/test-pipeline-cache-unrefs-texture.c | 9 ++++++--- 5 files changed, 7 insertions(+), 6 deletions(-) rename {cogl/tests => src/tests/cogl}/conform/test-pipeline-cache-unrefs-texture.c (94%) diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build index f98d1ee4e..22af47eea 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-pipeline-cache-unrefs-texture.c', 'test-texture-no-allocate.c', 'test-pipeline-shader-state.c', 'test-texture-rg.c', diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c index 5e4dcedbc..f0ea1d838 100644 --- a/cogl/tests/conform/test-conform-main.c +++ b/cogl/tests/conform/test-conform-main.c @@ -70,7 +70,6 @@ main (int argc, char **argv) UNPORTED_TEST (test_vertex_buffer_interleved); UNPORTED_TEST (test_vertex_buffer_mutability); - ADD_TEST (test_pipeline_cache_unrefs_texture, 0, 0); ADD_TEST (test_pipeline_shader_state, 0, 0); UNPORTED_TEST (test_viewport); diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h index 339bf7d18..64417a94a 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_pipeline_cache_unrefs_texture (void); void test_pipeline_shader_state (void); void test_gles2_context (void); void test_gles2_context_fbo (void); diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build index 097d10130..22cc7d7da 100644 --- a/src/tests/cogl/conform/meson.build +++ b/src/tests/cogl/conform/meson.build @@ -34,6 +34,7 @@ cogl_tests = [ [ 'test-framebuffer-get-bits', [] ], [ 'test-primitive-and-journal', [] ], [ 'test-copy-replace-texture', [] ], + [ 'test-pipeline-cache-unrefs-texture', [] ], ] cogl_test_conformance_includes = [ diff --git a/cogl/tests/conform/test-pipeline-cache-unrefs-texture.c b/src/tests/cogl/conform/test-pipeline-cache-unrefs-texture.c similarity index 94% rename from cogl/tests/conform/test-pipeline-cache-unrefs-texture.c rename to src/tests/cogl/conform/test-pipeline-cache-unrefs-texture.c index 81abe99e1..08a3d7ad9 100644 --- a/cogl/tests/conform/test-pipeline-cache-unrefs-texture.c +++ b/src/tests/cogl/conform/test-pipeline-cache-unrefs-texture.c @@ -1,7 +1,6 @@ #include -#include "test-declarations.h" -#include "test-utils.h" +#include "tests/cogl-test-utils.h" /* Keep track of the number of textures that we've created and are * still alive */ @@ -40,7 +39,7 @@ create_texture (void) return tex_2d; } -void +static void test_pipeline_cache_unrefs_texture (void) { CoglPipeline *pipeline = cogl_pipeline_new (test_ctx); @@ -90,3 +89,7 @@ test_pipeline_cache_unrefs_texture (void) if (cogl_test_verbose ()) g_print ("OK\n"); } + +COGL_TEST_SUITE ( + g_test_add_func ("/pipeline-cache-unref-texture", test_pipeline_cache_unrefs_texture); +)