diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-15 23:02:24 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-15 23:02:24 +0200 |
| commit | 4ca57dcae2291a09dcd84ccf056a65a2cf906c46 (patch) | |
| tree | a5319f407917edaba02dcae863c9ae92990ce65e /app | |
| parent | 0a1bc74d0142db0856cafc979a0450fed6671599 (diff) | |
| download | turns-4ca57dcae2291a09dcd84ccf056a65a2cf906c46.tar.xz turns-4ca57dcae2291a09dcd84ccf056a65a2cf906c46.zip | |
app/tests: add basic participant_row tests
Diffstat (limited to 'app')
| -rw-r--r-- | app/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | app/tests/widgets/participant_row.cpp | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 1074038..4f024a4 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -67,6 +67,7 @@ install(FILES # Tests add_executable("app-tests" + "tests/widgets/participant_row.cpp" "tests/windows/main.cpp" "tests/windows/participant_editor.cpp" ) diff --git a/app/tests/widgets/participant_row.cpp b/app/tests/widgets/participant_row.cpp new file mode 100644 index 0000000..0e91ad7 --- /dev/null +++ b/app/tests/widgets/participant_row.cpp @@ -0,0 +1,30 @@ +#include "turns/app/widgets/participant_row.hpp" + +#include "turns/domain/participant.hpp" +#include "turns/lang/messages.hpp" + +#include <catch2/catch_test_macros.hpp> +#include <catch2/generators/catch_generators.hpp> + +#include <algorithm> +#include <string> + +#include <gtkmm/widget.h> + +namespace turns::app::widgets::tests +{ + + TEST_CASE("A freshly constructed participant row") + { + SECTION("can be created without a participant") + { + REQUIRE(Gtk::make_managed<participant_row>(Glib::RefPtr<domain::participant>{})); + } + + SECTION("can be created with a participant") + { + REQUIRE(Gtk::make_managed<participant_row>(domain::participant::create("Tazmyla Fireforge", 13))); + } + } + +} // namespace turns::app::widgets::tests
\ No newline at end of file |
