Merge branch 'size_width_skip' into 'main'

tests: Do not always skip array overflow checks

See merge request GNOME/glib!4694
This commit is contained in:
Philip Withnall
2025-07-17 08:50:46 +00:00

View File

@@ -26,10 +26,11 @@
#undef G_DISABLE_ASSERT
#include "glib.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "glib.h"
/* Test data to be passed to any function which calls g_array_new(), providing
* the parameters for that call. Most #GArray tests should be repeated for all
@@ -359,7 +360,7 @@ static void
array_new_take_overflow (void)
{
#if SIZE_WIDTH <= UINT_WIDTH
g_test_skip ("Overflow test requires UINT_WIDTH > SIZE_WIDTH.");
g_test_skip ("Overflow test requires SIZE_WIDTH > UINT_WIDTH.");
#else
if (!g_test_undefined ())
return;
@@ -1355,7 +1356,7 @@ static void
pointer_array_new_take_overflow (void)
{
#if SIZE_WIDTH <= UINT_WIDTH
g_test_skip ("Overflow test requires UINT_WIDTH > SIZE_WIDTH.");
g_test_skip ("Overflow test requires SIZE_WIDTH > UINT_WIDTH.");
#else
if (!g_test_undefined ())
return;
@@ -1660,7 +1661,7 @@ static void
pointer_array_new_from_array_overflow (void)
{
#if SIZE_WIDTH <= UINT_WIDTH
g_test_skip ("Overflow test requires UINT_WIDTH > SIZE_WIDTH.");
g_test_skip ("Overflow test requires SIZE_WIDTH > UINT_WIDTH.");
#else
if (!g_test_undefined ())
return;
@@ -2898,7 +2899,7 @@ static void
byte_array_new_take_overflow (void)
{
#if SIZE_WIDTH <= UINT_WIDTH
g_test_skip ("Overflow test requires G_MAXSIZE > G_MAXUINT.");
g_test_skip ("Overflow test requires SIZE_WIDTH > UINT_WIDTH.");
#else
GByteArray* arr;