File: Sleep.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 (11 lines) | stat: -rw-r--r-- 326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#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));
}