X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/10607a708e616a3c911e2b07d412d1b1895845b2..70b904c575877c683e6c79cac4fbf7c6d89d0bde:/tests/mpint diff --git a/tests/mpint b/tests/mpint new file mode 100644 index 0000000..d0c9667 --- /dev/null +++ b/tests/mpint @@ -0,0 +1,39 @@ +# Test vectors for conversion between MP ints and C ints +# +# $Id: mpint,v 1.1 1999/11/25 11:38:33 mdw Exp $ + +# The tests look messy because I'm fighting with atoi here as well as the +# integer conversion routines I'm trying to test. + +fromuint { + 0 0; + 1 1; + -5 0xfffffffb; + 0x7fffffff 0x7fffffff; + -0x80000000 0x80000000; # Bastard torture test +} + +fromint { + 0 0; + 1 1; + -5 -5; + 0x7fffffff 0x7fffffff; + -0x80000000 -0x80000000; # Bastard torture test +} + +touint { + 0 0; + 1 1; + -5 -5; + 0x7fffffff 0x7fffffff; + 0x80000000 -0x80000000; # Bastard torture test +} + +toint { + 0 0; + 1 1; + -5 -5; + 0x7fffffff 0x7fffffff; + -0x80000000 -0x80000000; # Bastard torture test +} +