mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 05:06:12 +01:00
Add unit tests
Yay tests!
This commit is contained in:
1 parent
36c234fd90
commit
330b423ee9
10 files changed
+166
-7
No files matched your search
@@ -0,0 +1,11 @@
|
||||
#include <SFML/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));
|
||||
}
|
||||
Reference in new issue
Block a user