Improve atomic ops test coverage

This commit is contained in:
Matthias Clasen 2012-08-18 14:39:52 -04:00
parent 06d837b6a3
commit e181234fe5

View File

@ -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);