mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-05-04 14:33:50 +00:00
feat(region): add SRgnDestroy
This commit is contained in:
parent
1e1f2f819f
commit
1e86f98691
5 changed files with 55 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "test/Test.hpp"
|
||||
#include "EventTest.hpp"
|
||||
#include "storm/Core.hpp"
|
||||
#include "storm/Region.hpp"
|
||||
|
||||
TEST_CASE("StormDestroy", "[core]") {
|
||||
SECTION("always returns 1") {
|
||||
|
|
@ -36,4 +37,19 @@ TEST_CASE("StormDestroy", "[core]") {
|
|||
CHECK(SEvtDispatch(0, 0, 0, nullptr) == 1);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("SRgn") {
|
||||
SECTION("destroys region handles") {
|
||||
HSRGN rgn = nullptr;
|
||||
SRgnCreate(&rgn);
|
||||
REQUIRE(rgn != nullptr); // valid handle
|
||||
|
||||
CHECK(StormDestroy() == 1);
|
||||
|
||||
// fails to duplicate because handle is invalid
|
||||
HSRGN newrgn;
|
||||
SRgnDuplicate(rgn, &newrgn);
|
||||
CHECK(newrgn == nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue