From: Matthias Clasen Date: Wed, 31 May 2023 02:36:10 +0000 (-0400) Subject: Improve test coverage for GdkGLTexture X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~199^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a79da8b655e2ef3eb15f30a7adad332ff8489acd;p=gtk4.git Improve test coverage for GdkGLTexture --- diff --git a/testsuite/gdk/gltexture.c b/testsuite/gdk/gltexture.c index cb00e842ff..e593f4eeb5 100644 --- a/testsuite/gdk/gltexture.c +++ b/testsuite/gdk/gltexture.c @@ -2,6 +2,7 @@ #include #include "gdk/gdktextureprivate.h" #include "gdk/gdkglcontextprivate.h" +#include "gdk/gdkgltextureprivate.h" static cairo_surface_t * make_surface (void) @@ -202,6 +203,11 @@ G_GNUC_END_IGNORE_DEPRECATIONS texture = gdk_gl_texture_builder_build (builder, NULL, NULL); + g_assert_true (gdk_gl_texture_get_context (GDK_GL_TEXTURE (texture)) == context); + g_assert_true (gdk_gl_texture_get_id (GDK_GL_TEXTURE (texture)) == id); + g_assert_false (gdk_gl_texture_has_mipmap (GDK_GL_TEXTURE (texture))); + g_assert_true (gdk_gl_texture_get_sync (GDK_GL_TEXTURE (texture)) == sync); + data = g_malloc0 (64 * 64 * 4); gdk_texture_download (texture, data, 64 * 4);