From eab10b9a77ddfd894426fe2fcb3c65f1fc016554 Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Wed, 30 Oct 2024 11:38:06 +0100 Subject: [PATCH] tests/class_extern: Check that owner class is set correctly --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index 6dbff48..4c1bc5b 100644 --- a/main.c +++ b/main.c @@ -93,6 +93,9 @@ static int class_decl_cb(flamingo_t* flamingo, flamingo_val_t* class, void* data for (size_t i = 0; i < scope->vars_size; i++) { flamingo_var_t* const var = &scope->vars[i]; + assert(var->val->owner == scope); + assert(var->val->owner->owner == class); + if (flamingo_cstrcmp(var->key, "will_be_modified", var->key_size) == 0) { var->val->integer.integer = 420; }