Fix division-by-zero bug translating @MPW_MAX@ to an @mp@.
[u/mdw/catacomb] / tests / mpint
1 # Test vectors for conversion between MP ints and C ints
2 #
3 # $Id: mpint,v 1.4 2002/01/13 19:51:34 mdw Exp $
4
5 # The tests look messy because I'm fighting with atoi here as well as the
6 # integer conversion routines I'm trying to test.
7
8 fromuint {
9 0 0;
10 1 1;
11 -5 0xfffffffb;
12 0x7fffffff 0x7fffffff;
13 0x80000000 0x80000000; # Bastard torture test
14 0xffffffff 0xffffffff;
15 }
16
17 fromint {
18 0 0;
19 1 1;
20 -5 -5;
21 0x7fffffff 0x7fffffff;
22 -0x80000000 -0x80000000; # Bastard torture test
23 }
24
25 touint {
26 0 0;
27 1 1;
28 -5 -5;
29 0x7fffffff 0x7fffffff;
30 0x80000000 -0x80000000; # Bastard torture test
31 0xffffffff 0xffffffff;
32 }
33
34 toint {
35 0 0;
36 1 1;
37 -5 -5;
38 0x7fffffff 0x7fffffff;
39 -0x80000000 -0x80000000; # Bastard torture test
40 }