Files
CSFML/test/System/Sleep.test.cpp
T
Chris Thrasher c5158c77b4 Move CSFML source files to CSFML/ directory
This helps make it easier to distinguish SFML files from CSFML files.
This is especially important for CSFML private headers which are
often C++ code with .hpp file extensions. This change means SFML and
CSFML can use headers with the same name without conflict.
2024-08-24 14:05:06 -06:00

12 lines
333 B
C++

#include <CSFML/System/Sleep.h>
#include <catch2/catch_test_macros.hpp>
TEST_CASE("[System] sfSleep")
{
const auto startTime = std::chrono::steady_clock::now();
sfSleep(sfMilliseconds(10));
const auto elapsed = std::chrono::steady_clock::now() - startTime;
CHECK(elapsed >= std::chrono::milliseconds(10));
}