File: Sensor.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 (19 lines) | stat: -rw-r--r-- 811 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <CSFML/Window/Sensor.h>

#include <SFML/Window/Sensor.hpp>

#include <catch2/catch_test_macros.hpp>

TEST_CASE("[Window] sfSensor")
{
    SECTION("sfSensorType")
    {
        STATIC_CHECK(sfSensorAccelerometer == static_cast<int>(sf::Sensor::Type::Accelerometer));
        STATIC_CHECK(sfSensorGyroscope == static_cast<int>(sf::Sensor::Type::Gyroscope));
        STATIC_CHECK(sfSensorMagnetometer == static_cast<int>(sf::Sensor::Type::Magnetometer));
        STATIC_CHECK(sfSensorGravity == static_cast<int>(sf::Sensor::Type::Gravity));
        STATIC_CHECK(sfSensorUserAcceleration == static_cast<int>(sf::Sensor::Type::UserAcceleration));
        STATIC_CHECK(sfSensorOrientation == static_cast<int>(sf::Sensor::Type::Orientation));
        STATIC_CHECK(sfSensorCount == sf::Sensor::Count);
    }
}