Skip to content

Commit

Permalink
We pass 53-knowhow.t for ages, but forgot to add it here. :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 18, 2010
1 parent 70dfa83 commit abac6f9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions t/nqp/53-knowhow.t
@@ -0,0 +1,19 @@
knowhow Foo {
has $!bbq;
method new() { nqp::instance_of(self) }
method lol() {
"yay, methods"
}
method set_bbq($bbq) { $!bbq := $bbq; }
method get_bbq() { $!bbq }
}

plan(3);

ok(Foo.lol eq "yay, methods", "method calls on knowhow type object");

my $x := Foo.new;
ok($x.lol eq "yay, methods", "method calls on knowhow instance");

$x.set_bbq("wurst");
ok($x.get_bbq eq "wurst", "attributes on knowhow instance");

0 comments on commit abac6f9

Please sign in to comment.