mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Add tests for sf::Mouse
This commit is contained in:
parent
51b8b44e14
commit
2b261e844c
@ -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
|
||||
|
15
test/Window/Mouse.test.cpp
Normal file
15
test/Window/Mouse.test.cpp
Normal 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));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user