mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 18:01:31 +00:00
baseline
This commit is contained in:
18
tests/compiler/gc/global-init.ts
Normal file
18
tests/compiler/gc/global-init.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import "allocator/arena";
|
||||
import { register_count, link_count, unlink_count } from "./_dummy";
|
||||
|
||||
@start export function main(): void {}
|
||||
|
||||
class Ref {}
|
||||
|
||||
// should register only
|
||||
|
||||
var global: Ref = new Ref();
|
||||
assert(register_count == 1);
|
||||
assert(link_count == 0);
|
||||
assert(unlink_count == 0);
|
||||
|
||||
global = new Ref();
|
||||
assert(register_count == 2);
|
||||
assert(link_count == 0);
|
||||
assert(unlink_count == 0);
|
Reference in New Issue
Block a user