finalise interface & documentation

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
folling 2023-11-06 13:14:39 +01:00 committed by Folling
parent c5157bd849
commit 52580a4382
Signed by: folling
SSH key fingerprint: SHA256:S9qEx5WCFFLK49tE/LKnKuJYM5sw+++Dn6qJbbyxnCY
56 changed files with 2074 additions and 780 deletions

View file

@ -1,13 +1,11 @@
#include "ikarus/objects/object.h"
#include <initializer_list>
#include <catch2/catch_test_macros.hpp>
#include <ikarus/objects/object_type.h>
#include <objects/object.hpp>
IkarusObjectType ikarus_object_get_type(IkarusObject object) {
return object.type;
IkarusObjectType ikarus_object_get_type(IkarusObject const * object) {
return object->type;
}
TEST_CASE("object_type", "[object]") {
@ -22,6 +20,6 @@ TEST_CASE("object_type", "[object]") {
for (auto type : types) {
auto object = IkarusObject{.type = type};
REQUIRE(ikarus_object_get_type(object) == type);
REQUIRE(ikarus_object_get_type(&object) == type);
}
}