mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
chore(test): allocate thread param on heap in SThread::Create test
This commit is contained in:
parent
c4043d24ee
commit
b5cef8cbee
1 changed files with 4 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
#include "storm/Thread.hpp"
|
#include "storm/Thread.hpp"
|
||||||
|
#include "storm/Memory.hpp"
|
||||||
#include "test/Test.hpp"
|
#include "test/Test.hpp"
|
||||||
|
|
||||||
uint32_t threadProc(void* param) {
|
uint32_t threadProc(void* param) {
|
||||||
|
|
@ -32,7 +33,8 @@ TEST_CASE("SCritSect::Leave", "[thread]") {
|
||||||
TEST_CASE("SThread::Create", "[thread]") {
|
TEST_CASE("SThread::Create", "[thread]") {
|
||||||
SECTION("creates new thread") {
|
SECTION("creates new thread") {
|
||||||
SThread thread;
|
SThread thread;
|
||||||
char* threadName = const_cast<char*>("TestThread");
|
auto threadName = const_cast<char*>("TestThread");
|
||||||
REQUIRE(SThread::Create(threadProc, nullptr, thread, threadName, 0) != 0);
|
auto threadParam = SMemAlloc(16, nullptr, 0, 0x0);
|
||||||
|
REQUIRE(SThread::Create(threadProc, threadParam, thread, threadName, 0) != 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue