use Test::More;

use Doubly;

ok(my $foo = Doubly->new(100));

is($foo->data, 100);
ok($foo->add(200));
ok($foo->add(300));

for (0..10000) {
	$foo->add($_);
}

is($foo->data, 100);

is($foo->next->data, 200); 
is($foo->next->next->data, 300);
is($foo->next->next->next->data, 0);

done_testing();
