Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
basic tests for native type objects
  • Loading branch information
moritz committed Oct 26, 2011
1 parent 4cafc7d commit 29a84dc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions S02-types/native.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 18;
plan 21;

{
my int $x;
Expand Down Expand Up @@ -62,9 +62,16 @@ plan 18;

#?rakudo skip 'RT #102244'
{
my int $x;
my int $x = 2;
is $x.gist, 2, 'can call method on a native int';
my $gist = ($x = 3).gist;
is $gist, 3, 'Can call a method on the result of assignment to int-typed var';
}

# methods on native type objects
{
is num.gist, 'num()', 'num.gist';
nok str.defined, 'str.defined';
}

# vim: ft=perl6

0 comments on commit 29a84dc

Please sign in to comment.