mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(thread): implement SThread::Create for windows
This commit is contained in:
parent
4dbfb0b3be
commit
db87a5d782
7 changed files with 41 additions and 6 deletions
|
|
@ -1,6 +1,10 @@
|
|||
#include "storm/Thread.hpp"
|
||||
#include "test/Test.hpp"
|
||||
|
||||
uint32_t threadProc(void* param) {
|
||||
return 0;
|
||||
};
|
||||
|
||||
TEST_CASE("SGetCurrentThreadId", "[thread]") {
|
||||
SECTION("returns thread id") {
|
||||
uintptr_t threadId = SGetCurrentThreadId();
|
||||
|
|
@ -24,3 +28,11 @@ TEST_CASE("SCritSect::Leave", "[thread]") {
|
|||
SUCCEED();
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SThread::Create", "[thread]") {
|
||||
SECTION("creates new thread") {
|
||||
SThread thread;
|
||||
char* threadName = const_cast<char*>("TestThread");
|
||||
REQUIRE(SThread::Create(threadProc, nullptr, thread, threadName, 0) != 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue