feat(handle): add handle functions

This commit is contained in:
fallenoak 2023-01-01 20:59:41 -06:00 committed by GitHub
parent 57a1dae84c
commit 90246804d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 90 additions and 0 deletions

15
test/Handle.cpp Normal file
View file

@ -0,0 +1,15 @@
#include "common/Handle.hpp"
#include "test/Test.hpp"
class TestHandleObject : public CHandleObject {};
TEST_CASE("HandleCreate", "[handle]") {
SECTION("returns handle for subclass of CHandleObject") {
auto testObject = new TestHandleObject();
auto handle = HandleCreate(testObject);
CHECK(handle);
HandleClose(handle);
}
}