tests/cogl: Migrate point size test

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>
This commit is contained in:
Jonas Ådahl 2022-08-04 20:29:41 +02:00 committed by Marge Bot
parent ae9b4a1bcf
commit 2746861c6a
5 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,5 @@
cogl_test_conformance_sources = [ cogl_test_conformance_sources = [
'test-conform-main.c', 'test-conform-main.c',
'test-point-size.c',
'test-point-size-attribute.c', 'test-point-size-attribute.c',
'test-point-sprite.c', 'test-point-sprite.c',
'test-no-gl-header.c', 'test-no-gl-header.c',

View File

@ -78,7 +78,6 @@ main (int argc, char **argv)
TEST_REQUIREMENT_GL, TEST_REQUIREMENT_GL,
0); 0);
ADD_TEST (test_point_size, 0, 0);
ADD_TEST (test_point_size_attribute, ADD_TEST (test_point_size_attribute,
0, 0); 0, 0);
ADD_TEST (test_point_size_attribute_snippet, ADD_TEST (test_point_size_attribute_snippet,

View File

@ -10,7 +10,6 @@ void test_npot_texture (void);
void test_texture_get_set_data (void); void test_texture_get_set_data (void);
void test_alpha_textures (void); void test_alpha_textures (void);
void test_framebuffer_get_bits (void); void test_framebuffer_get_bits (void);
void test_point_size (void);
void test_point_size_attribute (void); void test_point_size_attribute (void);
void test_point_size_attribute_snippet (void); void test_point_size_attribute_snippet (void);
void test_point_sprite (void); void test_point_sprite (void);

View File

@ -20,6 +20,7 @@ cogl_tests = [
[ 'test-sparse-pipeline', [] ], [ 'test-sparse-pipeline', [] ],
[ 'test-read-texture-formats', ['gl', 'gl3'] ], [ 'test-read-texture-formats', ['gl', 'gl3'] ],
[ 'test-write-texture-formats', [] ], [ 'test-write-texture-formats', [] ],
[ 'test-point-size', [] ],
] ]
cogl_test_conformance_includes = [ cogl_test_conformance_includes = [

View File

@ -1,7 +1,6 @@
#include <cogl/cogl.h> #include <cogl/cogl.h>
#include "test-declarations.h" #include "tests/cogl-test-utils.h"
#include "test-utils.h"
/* This test assumes the GL driver supports point sizes up to 16 /* This test assumes the GL driver supports point sizes up to 16
pixels. Cogl should probably have some way of querying the size so pixels. Cogl should probably have some way of querying the size so
@ -46,7 +45,7 @@ verify_point_size (CoglFramebuffer *test_fb,
} }
} }
void static void
test_point_size (void) test_point_size (void)
{ {
int fb_width = cogl_framebuffer_get_width (test_fb); int fb_width = cogl_framebuffer_get_width (test_fb);
@ -99,3 +98,7 @@ test_point_size (void)
if (cogl_test_verbose ()) if (cogl_test_verbose ())
g_print ("OK\n"); g_print ("OK\n");
} }
COGL_TEST_SUITE (
g_test_add_func ("/point-size", test_point_size);
)