diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-09-13 10:08:28 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-09-14 08:51:10 +0300 |
commit | 0576870ebdbe813b5a084e1a279cb77077e6373e (patch) | |
tree | 01cad50191f9418aeebd55dfdde5d12c1eb289a9 /src/bookmarks/test | |
parent | bugfix: don't wipe bookmarks if they're not modified (diff) | |
download | rekonq-0576870ebdbe813b5a084e1a279cb77077e6373e.tar.xz |
Rename BookmarkModel to BookmarksTreeModel
- remove BookmarkManager
- remove BookmarkOwner
Diffstat (limited to 'src/bookmarks/test')
-rw-r--r-- | src/bookmarks/test/bookmarkmanager.cpp | 21 | ||||
-rw-r--r-- | src/bookmarks/test/test_bookmarkstreemodel.cpp | 25 |
2 files changed, 25 insertions, 21 deletions
diff --git a/src/bookmarks/test/bookmarkmanager.cpp b/src/bookmarks/test/bookmarkmanager.cpp deleted file mode 100644 index 5bfaf649..00000000 --- a/src/bookmarks/test/bookmarkmanager.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "../bookmarkmanager.hpp" -#include <QStandardPaths> -#include <gtest/gtest.h> - -// clazy:excludeall=non-pod-global-static - -namespace { -TEST(BookmarkManager, QStandardPaths) -{ - const auto file = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QString::fromLatin1("bookmarks.xbel")); - EXPECT_TRUE(file.isEmpty()) << qUtf8Printable(file); -} - -TEST(BookmarkManager, Manager) -{ - BookmarkManager manager("bookmarks.xbel"); - - const auto load_errors = manager.errors(); - EXPECT_EQ(load_errors.length(), 0) << qUtf8Printable(load_errors.join('\n')); -} -} // namespace
\ No newline at end of file diff --git a/src/bookmarks/test/test_bookmarkstreemodel.cpp b/src/bookmarks/test/test_bookmarkstreemodel.cpp new file mode 100644 index 00000000..febd4cd4 --- /dev/null +++ b/src/bookmarks/test/test_bookmarkstreemodel.cpp @@ -0,0 +1,25 @@ +#include <QFile> +#include <QStandardPaths> +#include <gtest/gtest.h> + +#include "../bookmarkstreemodel.hpp" + +// clazy:excludeall=non-pod-global-static + +namespace { +TEST(bookmarks, QStandardPaths) +{ + const auto file = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QString::fromLatin1("bookmarks.xbel")); + EXPECT_TRUE(file.isEmpty()) << qUtf8Printable(file); +} + +TEST(bookmarks, BookmarksTreeModel) +{ + BookmarksTreeModel model; + QFile f("bookmarks.xbel"); + ASSERT_TRUE(f.open(QIODevice::ReadOnly | QIODevice::Text)); + + EXPECT_TRUE(model.load(&f).isEmpty()); + f.close(); +} +} // namespace |