Skip to content

Commit e417703

Browse files
committed
Add initial tests for native ints.
1 parent 0c0bab6 commit e417703

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

t/nqp/64-native.t

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
plan(4);
2+
3+
{
4+
my int $x;
5+
ok(~$x eq '0', 'native int initialized to 0');
6+
7+
$x := 42;
8+
ok($x == 42, 'can set native int');
9+
10+
sub foo() {
11+
my $y := 58;
12+
ok($x == 42, 'can access native ints from nested scopes');
13+
ok($x + $y == 100, 'can add native ints to each other');
14+
}
15+
foo();
16+
}

0 commit comments

Comments
 (0)