diff options
| author | Martin Ridgers <[email protected]> | 2021-10-11 11:38:44 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-10-11 11:38:44 +0200 |
| commit | bfc38e4457353d93c193c77927977b3838f0cfc5 (patch) | |
| tree | 14d2a68d3bdd8d1d46cc9f0fc71bc4d82d0cdb59 /zencore/thread.cpp | |
| parent | ZEN_*_OPTIMIZATION for GCC and Clang (diff) | |
| download | zen-bfc38e4457353d93c193c77927977b3838f0cfc5.tar.xz zen-bfc38e4457353d93c193c77927977b3838f0cfc5.zip | |
Added some tests for pid-related functions
Diffstat (limited to 'zencore/thread.cpp')
| -rw-r--r-- | zencore/thread.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp index aa5e91c72..5aa0f2688 100644 --- a/zencore/thread.cpp +++ b/zencore/thread.cpp @@ -5,6 +5,7 @@ #include <fmt/format.h> #include <zencore/except.h> #include <zencore/string.h> +#include <zencore/testing.h> #if ZEN_PLATFORM_WINDOWS # include <zencore/windows.h> @@ -391,9 +392,20 @@ Sleep(int ms) // Testing related code follows... // +#if ZEN_WITH_TESTS + void thread_forcelink() { } +TEST_CASE("Thread") +{ + int Pid = GetCurrentProcessId(); + CHECK(Pid > 0); + CHECK(IsProcessRunning(Pid)); +} + +#endif // ZEN_WITH_TESTS + } // namespace zen |