diff options
author | Jeremie Guichard <djebrest@gmail.com> | 2018-04-09 10:09:34 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-09 07:59:51 -0700 |
commit | 7753352e6210ae69c2a79bdf2387eaca46becc64 (patch) | |
tree | 88c2594af6ff7c87b7923c7b3625653f3b5d7cfe /tests/testtaglist.h | |
parent | f1830cd44e75ac552e09dfd79f6ec9e0d90f8808 (diff) | |
download | subsurface-7753352e6210ae69c2a79bdf2387eaca46becc64.tar.gz |
Change taglist_get_tagstring to support 'unlimited' tag list size
Previous taglist_get_tagstring signature/implementation did not allow
handling of cases where inputted buffer could not contain all tags.
New implementation allocates buffer based on pre-computed size allowing to
insert all tags in the returned string.
Added get_taglist_string in qthelper to handle conversion to QString
Added TestTagList with tests for taglist_get_tagstring
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Diffstat (limited to 'tests/testtaglist.h')
-rw-r--r-- | tests/testtaglist.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/testtaglist.h b/tests/testtaglist.h new file mode 100644 index 000000000..7e6e94742 --- /dev/null +++ b/tests/testtaglist.h @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef TESTTAGLIST_H +#define TESTTAGLIST_H + +#include <QtTest> + +class TestTagList : public QObject { + Q_OBJECT +private slots: + void initTestCase(); + void cleanupTestCase(); + + void testGetTagstringNoTags(); + void testGetTagstringSingleTag(); + void testGetTagstringMultipleTags(); + void testGetTagstringWithAnEmptyTag(); + void testGetTagstringEmptyTagOnly(); +}; + +#endif |