From 0576870ebdbe813b5a084e1a279cb77077e6373e Mon Sep 17 00:00:00 2001 From: aqua Date: Tue, 13 Sep 2022 10:08:28 +0300 Subject: Rename BookmarkModel to BookmarksTreeModel - remove BookmarkManager - remove BookmarkOwner --- src/bookmarks/test/test_bookmarkstreemodel.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/bookmarks/test/test_bookmarkstreemodel.cpp (limited to 'src/bookmarks/test/test_bookmarkstreemodel.cpp') 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 +#include +#include + +#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 -- cgit v1.2.1