--- CBOR-XS/t/53_bignum.t 2016/04/25 21:30:23 1.4 +++ CBOR-XS/t/53_bignum.t 2016/04/26 16:07:04 1.6 @@ -1,9 +1,9 @@ -BEGIN { $| = 1; print "1..102\n"; } +BEGIN { $| = 1; print "1..105\n"; } BEGIN { $^W = 0 } # hate use CBOR::XS; -use Math::BigInt only => "Calc"; # needed for representation stability +use Math::BigInt only => "FastCalc"; # needed for representation stability print "ok 1\n"; @@ -35,5 +35,15 @@ $t = encode_cbor $t; print "d9010882c249056bc75e2d63100000c2492b5e3af16b187ffffe" eq (unpack "H*", $t) ? "" : "not ", "ok 101\n"; -print "ok 102\n"; +$t = encode_cbor CBOR::XS::tag 30, [4, 2]; +$t = decode_cbor $t; +print $t eq 2 ? "" : "not ", "ok 102 # $t\n"; + +$t = encode_cbor $t; +print "02" eq (unpack "H*", $t) ? "" : "not ", "ok 103\n"; + +$t = encode_cbor decode_cbor encode_cbor CBOR::XS::tag 30, [Math::BigInt->new (5), 2]; +print "d81e820502" eq (unpack "H*", $t) ? "" : "not ", "ok 104\n"; + +print "ok 105\n";