mirror of
https://github.com/thunderbrewhq/common.git
synced 2025-12-12 03:02:29 +00:00
feat(handle): add handle functions
This commit is contained in:
parent
57a1dae84c
commit
90246804d0
4 changed files with 90 additions and 0 deletions
15
test/Handle.cpp
Normal file
15
test/Handle.cpp
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue