mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(thread): add SCritSect constructor
This commit is contained in:
parent
61d2c8d01e
commit
665f057516
3 changed files with 32 additions and 0 deletions
|
|
@ -7,3 +7,20 @@ TEST_CASE("SGetCurrentThreadId", "[thread]") {
|
|||
CHECK(threadId > 0);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SCritSect::Enter", "[thread]") {
|
||||
SECTION("locks critical section") {
|
||||
SCritSect critSect;
|
||||
critSect.Enter();
|
||||
SUCCEED();
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SCritSect::Leave", "[thread]") {
|
||||
SECTION("unlocks critical section") {
|
||||
SCritSect critSect;
|
||||
critSect.Enter();
|
||||
critSect.Leave();
|
||||
SUCCEED();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue