File: Mouse.test.cpp

package info (click to toggle)
libcsfml 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,240 kB
  • sloc: cpp: 7,741; ansic: 2,616; sh: 805; makefile: 16
file content (24 lines) | stat: -rw-r--r-- 906 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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(sfMouseButtonExtra1 == static_cast<int>(sf::Mouse::Button::Extra1));
        STATIC_CHECK(sfMouseButtonExtra2 == 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));
    }
}