feat(thread): add SCritSect constructor

This commit is contained in:
fallenoak 2022-12-28 15:43:57 -06:00 committed by GitHub
parent 61d2c8d01e
commit 665f057516
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 0 deletions

View file

@ -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();
}
}