diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-11-15 13:02:14 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-11-15 13:05:14 -0600 |
commit | 2905fb35f8d7e19e0b9422060689d71c72bb6f39 (patch) | |
tree | f7609ecb5acc5517e36a26dd68cb51838ec8e8c3 /t/06-addsub.t | |
parent | d1f721b320d72e83c0cb24c45fe9995a6dcf29c2 (diff) | |
download | package-stash-2905fb35f8d7e19e0b9422060689d71c72bb6f39.tar.gz package-stash-2905fb35f8d7e19e0b9422060689d71c72bb6f39.zip |
almost complete pure perl implementation
the leak tests are failing for some reason, need to track that down
Diffstat (limited to 't/06-addsub.t')
-rw-r--r-- | t/06-addsub.t | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/t/06-addsub.t b/t/06-addsub.t index e8445f7..4889d59 100644 --- a/t/06-addsub.t +++ b/t/06-addsub.t @@ -1,6 +1,7 @@ +#!/usr/bin/env perl use strict; use warnings; - +use lib 't/lib'; use Test::More; use Test::Fatal; @@ -15,9 +16,9 @@ my $foo_stash = Package::Stash->new('Foo'); ok(!defined($Foo::{funk}), '... the &funk slot has not been created yet'); -ok(!exception { - $foo_stash->add_package_symbol('&funk' => sub { "Foo::funk", __LINE__ }); -}, '... created &Foo::funk successfully'); +is(exception { + $foo_stash->add_symbol('&funk' => sub { "Foo::funk", __LINE__ }); +}, undef, '... created &Foo::funk successfully'); ok(defined($Foo::{funk}), '... the &funk slot was created successfully'); @@ -32,7 +33,7 @@ my $line = (Foo->funk())[1]; is $DB::sub{'Foo::funk'}, sprintf "%s:%d-%d", __FILE__, $line, $line, '... got the right %DB::sub value for funk default args'; -$foo_stash->add_package_symbol( +$foo_stash->add_symbol( '&dunk' => sub { "Foo::dunk" }, filename => "FileName", first_line_num => 100, |