tests/cogl: Migrate texture get/set data test
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>
This commit is contained in:
parent
85ad013b2d
commit
09990f8bcc
5 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,5 @@
|
||||||
cogl_test_conformance_sources = [
|
cogl_test_conformance_sources = [
|
||||||
'test-conform-main.c',
|
'test-conform-main.c',
|
||||||
'test-texture-get-set-data.c',
|
|
||||||
'test-framebuffer-get-bits.c',
|
'test-framebuffer-get-bits.c',
|
||||||
'test-primitive-and-journal.c',
|
'test-primitive-and-journal.c',
|
||||||
'test-copy-replace-texture.c',
|
'test-copy-replace-texture.c',
|
||||||
|
|
|
@ -65,7 +65,6 @@ main (int argc, char **argv)
|
||||||
UNPORTED_TEST (test_texture_mipmaps);
|
UNPORTED_TEST (test_texture_mipmaps);
|
||||||
UNPORTED_TEST (test_texture_rectangle);
|
UNPORTED_TEST (test_texture_rectangle);
|
||||||
UNPORTED_TEST (test_texture_pixmap_x11);
|
UNPORTED_TEST (test_texture_pixmap_x11);
|
||||||
ADD_TEST (test_texture_get_set_data, 0, 0);
|
|
||||||
|
|
||||||
UNPORTED_TEST (test_vertex_buffer_contiguous);
|
UNPORTED_TEST (test_vertex_buffer_contiguous);
|
||||||
UNPORTED_TEST (test_vertex_buffer_interleved);
|
UNPORTED_TEST (test_vertex_buffer_interleved);
|
||||||
|
|
|
@ -5,7 +5,6 @@ void test_path (void);
|
||||||
void test_path_clip (void);
|
void test_path_clip (void);
|
||||||
void test_depth_test (void);
|
void test_depth_test (void);
|
||||||
void test_backface_culling (void);
|
void test_backface_culling (void);
|
||||||
void test_texture_get_set_data (void);
|
|
||||||
void test_framebuffer_get_bits (void);
|
void test_framebuffer_get_bits (void);
|
||||||
void test_primitive_and_journal (void);
|
void test_primitive_and_journal (void);
|
||||||
void test_copy_replace_texture (void);
|
void test_copy_replace_texture (void);
|
||||||
|
|
|
@ -30,6 +30,7 @@ cogl_tests = [
|
||||||
[ 'test-map-buffer-range', [] ],
|
[ 'test-map-buffer-range', [] ],
|
||||||
[ 'test-npot-texture', [] ],
|
[ 'test-npot-texture', [] ],
|
||||||
[ 'test-alpha-textures', [] ],
|
[ 'test-alpha-textures', [] ],
|
||||||
|
[ 'test-texture-get-set-data', [] ],
|
||||||
]
|
]
|
||||||
|
|
||||||
cogl_test_conformance_includes = [
|
cogl_test_conformance_includes = [
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "test-declarations.h"
|
#include "tests/cogl-test-utils.h"
|
||||||
#include "test-utils.h"
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_texture (int width, int height, TestUtilsTextureFlags flags)
|
check_texture (int width, int height, TestUtilsTextureFlags flags)
|
||||||
|
@ -129,7 +128,7 @@ check_texture (int width, int height, TestUtilsTextureFlags flags)
|
||||||
g_free (data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
test_texture_get_set_data (void)
|
test_texture_get_set_data (void)
|
||||||
{
|
{
|
||||||
/* First try without atlasing */
|
/* First try without atlasing */
|
||||||
|
@ -143,3 +142,7 @@ test_texture_get_set_data (void)
|
||||||
/* And in the other direction. */
|
/* And in the other direction. */
|
||||||
check_texture (5128, 4, TEST_UTILS_TEXTURE_NO_ATLAS);
|
check_texture (5128, 4, TEST_UTILS_TEXTURE_NO_ATLAS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
COGL_TEST_SUITE (
|
||||||
|
g_test_add_func ("/texture/get-set-data", test_texture_get_set_data);
|
||||||
|
)
|
Loading…
Reference in a new issue