Add tests for sf::Mouse

This commit is contained in:
Chris Thrasher 2023-09-18 19:48:27 -06:00
parent 51b8b44e14
commit 2b261e844c
No known key found for this signature in database
GPG Key ID: 56FB686C9DFC8E2C
2 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,15 @@
#include <SFML/Window/Mouse.hpp>
#include <catch2/catch_test_macros.hpp>
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));
}
}