use Test::More;

my $deep = { okay => 1 };
my $deeper = { okay => 2 };

$deep->{deeper} = $deeper;
$deep->{deep} = $deep;

$deeper->{deep} = $deep;

use Const::XS qw/all/;

ok(1);

eval {
	make_readonly($deeper);
};

like($@, qr/Looks like you are in deep recursion/);

eval {
	unmake_readonly($deeper);
};

like($@, qr/Looks like you are in deep recursion/);

done_testing();
