chiark / gitweb /
ec-bin (ec_binproj): Make curve setup faster.
[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   0x7ffff 0x7ffff;
13   0x80000 0x80000;
14   0xfffff 0xfffff;
15   0x7fffffff 0x7fffffff;
16   0x80000000 0x80000000;                # Bastard torture test
17   0xffffffff 0xffffffff;
18 }
19
20 fromint {
21   0 0;
22   1 1;
23   -5 -5;
24   0x7ffff 0x7ffff;
25   0x80000 0x80000;
26   0xfffff 0xfffff;
27   0x7fffffff 0x7fffffff;
28   -0x80000000 -0x80000000;              # Bastard torture test
29 }
30
31 touint {
32   0 0;
33   1 1;
34   -5 -5;
35   0x7ffff 0x7ffff;
36   0x80000 0x80000;
37   0xfffff 0xfffff;
38   0x7fffffff 0x7fffffff;
39   0x80000000 -0x80000000;               # Bastard torture test
40   0xffffffff 0xffffffff;
41 }
42
43 toint {
44   0 0;
45   1 1;
46   -5 -5;
47   0x7ffff 0x7ffff;
48   0x80000 0x80000;
49   0xfffff 0xfffff;
50   0x7fffffff 0x7fffffff;
51   -0x80000000 -0x80000000;              # Bastard torture test
52 }