diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 563d6d6c2..1351e1863 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -80,6 +80,7 @@ set(WINDOW_SRC Window/GlResource.test.cpp Window/Joystick.test.cpp Window/Keyboard.test.cpp + Window/Mouse.test.cpp Window/VideoMode.test.cpp Window/Vulkan.test.cpp Window/Window.test.cpp diff --git a/test/Window/Mouse.test.cpp b/test/Window/Mouse.test.cpp new file mode 100644 index 000000000..7f53085c2 --- /dev/null +++ b/test/Window/Mouse.test.cpp @@ -0,0 +1,15 @@ +#include + +#include + +TEST_CASE("[Window] sf::Mouse") +{ + SECTION("isButtonPressed()") + { + CHECK(!sf::Mouse::isButtonPressed(sf::Mouse::Button::Left)); + CHECK(!sf::Mouse::isButtonPressed(sf::Mouse::Button::Right)); + CHECK(!sf::Mouse::isButtonPressed(sf::Mouse::Button::Middle)); + CHECK(!sf::Mouse::isButtonPressed(sf::Mouse::Button::Extra1)); + CHECK(!sf::Mouse::isButtonPressed(sf::Mouse::Button::Extra2)); + } +}