use strict;
use warnings;
-use Test::More tests => 41;
+use Test::More tests => 42;
use Sub::Nary;
sub rec2 { rec1(); }
my @tests = (
+ [ sub { hlaghlaghlagh() }, 'list' ],
+
[ sub { zero }, 0 ],
[ sub { one }, 1 ],
[ sub { two }, 2 ],
my $i = 1;
for (@tests) {
my $r = $sn->nary($_->[0]);
- is_deeply($r, { $_->[1] => 1 }, 'call test ' . $i);
+ my $exp = ref $_->[1] ? $_->[1] : { $_->[1] => 1 };
+ is_deeply($r, $exp, 'call test ' . $i);
++$i;
}