summaryrefslogtreecommitdiff
path: root/gui/tests/gtk-test.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/tests/gtk-test.hpp')
-rw-r--r--gui/tests/gtk-test.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/gui/tests/gtk-test.hpp b/gui/tests/gtk-test.hpp
new file mode 100644
index 0000000..5ac6753
--- /dev/null
+++ b/gui/tests/gtk-test.hpp
@@ -0,0 +1,33 @@
+/*
+ * SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com>
+ * SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#ifndef TURNS_GUI_TESTS_GTK_TEST_HPP
+#define TURNS_GUI_TESTS_GTK_TEST_HPP
+
+#include <catch2/reporters/catch_reporter_event_listener.hpp>
+#include <catch2/reporters/catch_reporter_registrars.hpp>
+
+#include <adwaitamm/application.hpp>
+#include <glibmm/refptr.h>
+
+namespace Turns::gui::tests
+{
+
+ struct gtk_test : Catch::EventListenerBase
+ {
+ using Catch::EventListenerBase::EventListenerBase;
+
+ static inline Glib::RefPtr<Adwaita::Application> application{};
+
+ auto testRunStarting(Catch::TestRunInfo const &) -> void override;
+ auto testRunEnded(Catch::TestRunStats const &) -> void override;
+ auto testCaseEnded(Catch::TestCaseStats const &) -> void override;
+ };
+
+ CATCH_REGISTER_LISTENER(gtk_test);
+
+} // namespace turns::ui::tests
+
+#endif