From 0c6eb866982c8180d6b4aede4907cf1153643f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 4 Aug 2022 20:02:49 +0200 Subject: [PATCH] tests/cogl: Migrate offscreen 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/tests => src/tests/cogl}/conform/test-offscreen.c | 9 ++++++--- 5 files changed, 7 insertions(+), 6 deletions(-) rename {cogl/tests => src/tests/cogl}/conform/test-offscreen.c (98%) diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build index 72e4a21f0..19f5355ab 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-offscreen.c', 'test-journal.c', 'test-primitive.c', 'test-sparse-pipeline.c', diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c index c44958ea1..43fddfd74 100644 --- a/cogl/tests/conform/test-conform-main.c +++ b/cogl/tests/conform/test-conform-main.c @@ -80,7 +80,6 @@ main (int argc, char **argv) ADD_TEST (test_primitive, 0, 0); - ADD_TEST (test_offscreen, 0, 0); ADD_TEST (test_journal_unref_flush, 0, 0); ADD_TEST (test_framebuffer_get_bits, TEST_REQUIREMENT_GL, diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h index 41fa469ba..a6ea2d871 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_offscreen (void); void test_journal_unref_flush (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 d0032955d..4c01621ed 100644 --- a/src/tests/cogl/conform/meson.build +++ b/src/tests/cogl/conform/meson.build @@ -14,6 +14,7 @@ cogl_tests = [ 'test-wrap-modes', 'test-sub-texture', 'test-custom-attributes', + 'test-offscreen', ] cogl_test_conformance_includes = [ diff --git a/cogl/tests/conform/test-offscreen.c b/src/tests/cogl/conform/test-offscreen.c similarity index 98% rename from cogl/tests/conform/test-offscreen.c rename to src/tests/cogl/conform/test-offscreen.c index 5dfe17e41..ae63123e5 100644 --- a/cogl/tests/conform/test-offscreen.c +++ b/src/tests/cogl/conform/test-offscreen.c @@ -2,8 +2,7 @@ #include -#include "test-declarations.h" -#include "test-utils.h" +#include "tests/cogl-test-utils.h" #define RED 0 #define GREEN 1 @@ -192,7 +191,7 @@ test_flush (TestState *state) cogl_object_unref (pipeline); } -void +static void test_offscreen (void) { TestState state; @@ -206,3 +205,7 @@ test_offscreen (void) if (cogl_test_verbose ()) g_print ("OK\n"); } + +COGL_TEST_SUITE ( + g_test_add_func ("/offscreen", test_offscreen); +)