Skip to content

Commit

Permalink
beginnings of a unit test for NCList
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Feb 9, 2012
1 parent 9b97e7d commit 8f35412
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/perl_tests/nclist.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
use strict;
use warnings;

use Test::More;

use_ok('NCList');

my @features = (
[ 123, 123 ],
[ 123, 340 ],
);
my $list = NCList->new( sub { $_[0][0] }, sub { $_[0][1] }, sub { $_[0][2] = $_[1] }, \@features );
is_deeply(
$list->nestedList,
[[
123,
340,
[
[
123,
123
]
]
]],
'got the right nested list'
) or diag explain $list->nestedList;

done_testing;

0 comments on commit 8f35412

Please sign in to comment.