summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_atomic_include.template8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_atomic_include.template b/tests/test_atomic_include.template
index 8d4efc7..0001fa7 100644
--- a/tests/test_atomic_include.template
+++ b/tests/test_atomic_include.template
@@ -73,7 +73,7 @@ void test_atomicXX(void)
# endif
# if defined(AO_HAVE_fetch_and_addXX)
TA_assert(AO_fetch_and_addXX(&x, 42) == 13);
- TA_assert(AO_fetch_and_addXX(&x, -42) == 55);
+ TA_assert(AO_fetch_and_addXX(&x, (AO_t)(-42)) == 55);
# else
MISSING(AO_fetch_and_add);
# endif
@@ -111,7 +111,7 @@ void test_atomicXX(void)
# endif
# if defined(AO_HAVE_short_fetch_and_addXX)
TA_assert(AO_short_fetch_and_addXX(&s, 42) == 13);
- TA_assert(AO_short_fetch_and_addXX(&s, -42) == 55);
+ TA_assert(AO_short_fetch_and_addXX(&s, (unsigned short)-42) == 55);
# else
MISSING(AO_short_fetch_and_add);
# endif
@@ -148,7 +148,7 @@ void test_atomicXX(void)
# endif
# if defined(AO_HAVE_char_fetch_and_addXX)
TA_assert(AO_char_fetch_and_addXX(&b, 42) == 13);
- TA_assert(AO_char_fetch_and_addXX(&b, -42) == 55);
+ TA_assert(AO_char_fetch_and_addXX(&b, (unsigned char)-42) == 55);
# else
MISSING(AO_char_fetch_and_add);
# endif
@@ -185,7 +185,7 @@ void test_atomicXX(void)
# endif
# if defined(AO_HAVE_int_fetch_and_addXX)
TA_assert(AO_int_fetch_and_addXX(&zz, 42) == 13);
- TA_assert(AO_int_fetch_and_addXX(&zz, -42) == 55);
+ TA_assert(AO_int_fetch_and_addXX(&zz, (unsigned int)-42) == 55);
# else
MISSING(AO_int_fetch_and_add);
# endif