Skip to content
Browse files

test that private methods cannot be called from outside

  • Loading branch information...
1 parent 645235f commit e2cbb6d823775c956d1be32eede083252deef8bf @moritz moritz committed Sep 30, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 S12-methods/private.t
View
3 S12-methods/private.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 9;
+plan 10;
# L<S12/Private methods/"Private methods are declared using">
@@ -15,6 +15,7 @@ class A {
}
is A.new().public, 12, 'Can call private method from within the class';
+nok eval('A.new!private'), 'Can not call private method from outside';
# indirect call syntax for public and private methods

0 comments on commit e2cbb6d

Please sign in to comment.
Something went wrong with that request. Please try again.