Skip to content

Commit

Permalink
tests/class_extern: Check that owner class is set correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Oct 30, 2024
1 parent f482ca2 commit eab10b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit eab10b9

Please sign in to comment.