[glib] Improve atomic ops test coverage
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Improve atomic ops test coverage
- Date: Sat, 18 Aug 2012 18:42:02 +0000 (UTC)
commit e181234fe5bbf80be3973d4803bce68887a771c6
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 18 14:39:52 2012 -0400
Improve atomic ops test coverage
glib/tests/atomic.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/atomic.c b/glib/tests/atomic.c
index c1ebc66..85483ed 100644
--- a/glib/tests/atomic.c
+++ b/glib/tests/atomic.c
@@ -162,6 +162,11 @@ test_types (void)
s2 = g_atomic_int_xor ((guint*)&s, 4);
g_assert_cmpint (s2, ==, 12);
g_assert_cmpint (s, ==, 8);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ s2 = g_atomic_int_exchange_and_add ((gint*)&s, 1);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ g_assert_cmpint (s2, ==, 8);
+ g_assert_cmpint (s, ==, 9);
g_atomic_pointer_set (&vp, 0);
vp2 = g_atomic_pointer_get (&vp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]