diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-05-21 11:46:53 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-05-21 11:55:49 +0100 |
commit | 1eaa54d91ccbd5e67e5709a2bc1f3362ab30c4bd (patch) | |
tree | 66226016f9e336767c914832a832dccb79677cb6 /tests/intset.c | |
parent | 695b6de8fab432728b1b5a666280d868c8532aec (diff) | |
download | telepathy-glib-1eaa54d91ccbd5e67e5709a2bc1f3362ab30c4bd.tar.gz |
tp_intset_is_empty: add
Now that we're using a different representation of int sets, checking
for empty intsets is very, very cheap.
Diffstat (limited to 'tests/intset.c')
-rw-r--r-- | tests/intset.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/intset.c b/tests/intset.c index b94e0a898..c456e5dba 100644 --- a/tests/intset.c +++ b/tests/intset.c @@ -15,6 +15,9 @@ int main (int argc, char **argv) g_type_init (); + g_assert (tp_intset_is_empty (set1)); + g_assert_cmpuint (tp_intset_size (set1), ==, 0); + tp_intset_add (set1, 0); tp_intset_add (set1, 2); @@ -25,6 +28,7 @@ int main (int argc, char **argv) tp_intset_add (set1, 1024); tp_intset_add (set1, 32); + g_assert (!tp_intset_is_empty (set1)); g_assert_cmpuint (tp_intset_size (set1), ==, 7); g_assert (tp_intset_is_member (set1, 2)); |