diff options
author | Gary Kramlich <grim@reaperworld.com> | 2022-11-09 23:15:35 -0600 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2022-11-09 23:15:35 -0600 |
commit | 1f795a4ace31a4c07914393261df169edb0dc2ff (patch) | |
tree | 2d3c621f9800f926e12c33afe0fa4a7a44d50f05 /libpurple/tests | |
parent | e929bad905f891dc84265bc4a3230c5a51278520 (diff) | |
download | pidgin-1f795a4ace31a4c07914393261df169edb0dc2ff.tar.gz |
Don't allow duplicate tags in PurpleTags
Originally I was thinking it might be useful to store counter objects in the
tags, but that adds a bunch of complexity to the serialization layer and tag
users can just get the existing tag, and then increment the value themselves.
Testing Done:
Ran the unit tests.
Reviewed at https://reviews.imfreedom.org/r/2053/
Diffstat (limited to 'libpurple/tests')
-rw-r--r-- | libpurple/tests/test_tags.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpurple/tests/test_tags.c b/libpurple/tests/test_tags.c index 01cab91823..225aec1260 100644 --- a/libpurple/tests/test_tags.c +++ b/libpurple/tests/test_tags.c @@ -86,7 +86,7 @@ test_purple_tags_add_duplicate_bare(void) { g_assert_cmpuint(purple_tags_get_count(tags), ==, 1); purple_tags_add(tags, "tag1"); - g_assert_cmpuint(purple_tags_get_count(tags), ==, 2); + g_assert_cmpuint(purple_tags_get_count(tags), ==, 1); g_clear_object(&tags); } @@ -122,7 +122,7 @@ test_purple_tags_add_duplicate_with_value(void) { g_assert_cmpuint(purple_tags_get_count(tags), ==, 1); purple_tags_add(tags, "tag1:purple"); - g_assert_cmpuint(purple_tags_get_count(tags), ==, 2); + g_assert_cmpuint(purple_tags_get_count(tags), ==, 1); g_clear_object(&tags); } |