mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 13:06:13 +01:00
Add more tests for the Window module
This commit is contained in:
1 parent
02d6d4937a
commit
d971aada83
6 files changed
+114
-1
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#include <CSFML/Window/Mouse.h>
|
||||
|
||||
#include <SFML/Window/Mouse.hpp>
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
TEST_CASE("[Window] sfMouse")
|
||||
{
|
||||
SECTION("sfMouseButton")
|
||||
{
|
||||
STATIC_CHECK(sfMouseLeft == static_cast<int>(sf::Mouse::Button::Left));
|
||||
STATIC_CHECK(sfMouseRight == static_cast<int>(sf::Mouse::Button::Right));
|
||||
STATIC_CHECK(sfMouseMiddle == static_cast<int>(sf::Mouse::Button::Middle));
|
||||
STATIC_CHECK(sfMouseXButton1 == static_cast<int>(sf::Mouse::Button::Extra1));
|
||||
STATIC_CHECK(sfMouseXButton2 == static_cast<int>(sf::Mouse::Button::Extra2));
|
||||
STATIC_CHECK(sfMouseButtonCount == sf::Mouse::ButtonCount);
|
||||
}
|
||||
|
||||
SECTION("sfMouseWheel")
|
||||
{
|
||||
STATIC_CHECK(sfMouseHorizontalWheel == static_cast<int>(sf::Mouse::Wheel::Horizontal));
|
||||
STATIC_CHECK(sfMouseVerticalWheel == static_cast<int>(sf::Mouse::Wheel::Vertical));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user