summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cogl/tests/conform/meson.build1
-rw-r--r--cogl/tests/conform/test-conform-main.c2
-rw-r--r--cogl/tests/conform/test-declarations.h1
-rw-r--r--src/tests/cogl/conform/meson.build1
-rw-r--r--src/tests/cogl/conform/test-map-buffer-range.c (renamed from cogl/tests/conform/test-map-buffer-range.c)15
5 files changed, 13 insertions, 7 deletions
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 32b98cdf9..f105f4128 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-map-buffer-range.c',
'test-npot-texture.c',
'test-alpha-textures.c',
'test-texture-get-set-data.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 559ceed53..f5960a304 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -77,8 +77,6 @@ main (int argc, char **argv)
TEST_REQUIREMENT_GL,
0);
- ADD_TEST (test_map_buffer_range, TEST_REQUIREMENT_MAP_WRITE, 0);
-
ADD_TEST (test_primitive_and_journal, 0, 0);
ADD_TEST (test_copy_replace_texture, 0, 0);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 4b5291103..b0323fb00 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -9,7 +9,6 @@ void test_npot_texture (void);
void test_texture_get_set_data (void);
void test_alpha_textures (void);
void test_framebuffer_get_bits (void);
-void test_map_buffer_range (void);
void test_primitive_and_journal (void);
void test_copy_replace_texture (void);
void test_pipeline_cache_unrefs_texture (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index 3fe80658f..de4f56f05 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -27,6 +27,7 @@ cogl_tests = [
[ 'test-no-gl-header', [] ],
[ 'test-layer-remove', [] ],
[ 'test-alpha-test', [] ],
+ [ 'test-map-buffer-range', [] ],
]
cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-map-buffer-range.c b/src/tests/cogl/conform/test-map-buffer-range.c
index c4d28aaac..92ac39752 100644
--- a/cogl/tests/conform/test-map-buffer-range.c
+++ b/src/tests/cogl/conform/test-map-buffer-range.c
@@ -2,8 +2,7 @@
#include <string.h>
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
static uint8_t
tex_data[2 * 2 * 4] =
@@ -23,7 +22,7 @@ vertex_data[4] =
{ 1, 1, 0, 0 }
};
-void
+static void
test_map_buffer_range (void)
{
CoglTexture2D *tex;
@@ -35,6 +34,12 @@ test_map_buffer_range (void)
CoglAttribute *tex_coord_attribute;
CoglPrimitive *primitive;
+ if (!cogl_has_feature (test_ctx, COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE))
+ {
+ g_test_skip ("Missing map buffer for write capability");
+ return;
+ }
+
tex = cogl_texture_2d_new_from_data (test_ctx,
2, 2, /* width/height */
COGL_PIXEL_FORMAT_RGBA_8888_PRE,
@@ -122,3 +127,7 @@ test_map_buffer_range (void)
if (cogl_test_verbose ())
g_print ("OK\n");
}
+
+COGL_TEST_SUITE (
+ g_test_add_func ("/map-buffer-range", test_map_buffer_range);
+)