Codebase list libcryptx-perl / 3a40bcb8-0ca4-4d3f-afb9-64c865dbdd41/upstream t / mbi_ltm_storable.t
3a40bcb8-0ca4-4d3f-afb9-64c865dbdd41/upstream

Tree @3a40bcb8-0ca4-4d3f-afb9-64c865dbdd41/upstream (Download .tar.gz)

mbi_ltm_storable.t @3a40bcb8-0ca4-4d3f-afb9-64c865dbdd41/upstreamraw · history · blame

use strict;
use warnings;
use Test::More;

BEGIN {
  plan skip_all => "requires Storable 2.0+" unless eval { require Storable && eval($Storable::VERSION) >= 2.0 };
  plan tests => 1;
}

use Math::BigInt::LTM;

use Storable qw(freeze thaw);

my $num = Math::BigInt::LTM->_new(42);

my $serialised = freeze $num;
my $cloned = thaw $serialised;

ok(!Math::BigInt::LTM->_acmp($cloned, $num));