use Test::More;
use doubly;

ok(my $linked_list = doubly->new());

ok($linked_list->add({ a => 1}));
ok($linked_list = $linked_list->add({ b => 2 }));
ok($linked_list->add({ c => 3 }));
ok($linked_list->add({ d => 4 }));

ok($linked_list = $linked_list->start);

is($linked_list->data->{a}, 1);
is($linked_list->next->data->{b}, 2);
is($linked_list->next->next->data->{c}, 3);
is($linked_list->next->next->next->data->{d}, 4);

done_testing();
