1 /* tests/test-ntl-lzz_p.cpp
2 * Copyright (C) 2002 William J. Turner
3 *
4 * Written by William J. Turner <wjturner@math.ncsu.edu>
5 *
6 * ========LICENCE========
7 * This file is part of the library LinBox.
8 *
9 * LinBox is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 * ========LICENCE========
23 */
24
25 /*! @file tests/test-ntl-lzz_p.C
26 * @ingroup tests
27 * @brief no doc.
28 * @test no doc.
29 */
30
31
32 #include "linbox/linbox-config.h"
33
34 #include <iostream>
35 #include <fstream>
36
37 #include "linbox/ring/ntl.h"
38
39 #include "test-field.h"
40
41 using namespace LinBox;
42
main(int argc,char ** argv)43 int main (int argc, char **argv)
44 {
45 static integer q = 1073741789;
46 static size_t n = 10000;
47 static int iterations = 1;
48
49 static Argument args[] = {
50 { 'q', "-q Q", "Operate over the \"field\" GF(Q) [1].", TYPE_INTEGER, &q },
51 { 'n', "-n N", "Set dimension of test vectors to NxN.", TYPE_INT, &n },
52 { 'i', "-i I", "Perform each test for I iterations.", TYPE_INT, &iterations },
53 END_OF_ARGUMENTS
54 };
55
56 parseArguments (argc, argv, args);
57
58 commentator().start("NTL_zz_p field test suite", "NTL_zz_p");
59 bool pass = true;
60
61 //NTL::zz_p::init(q);
62 //Givaro::ZRing<NTL::zz_p> F(q);
63 // NTL_zz_p F(q);
64 NTL_zz_p F(q);
65
66 if (F.characteristic() != q)
67 exit(-1);
68
69 // Make sure some more detailed messages get printed
70 commentator().getMessageClass (INTERNAL_DESCRIPTION).setMaxDepth (2);
71
72 if (!runFieldTests (F, "NTL_zz_p", (unsigned int)iterations, n, false)) pass = false;
73
74 #if 0
75 FieldArchetype K(new NTL_zz_p(101));
76
77 if (!testField<FieldArchetype> (K, "Testing archetype with envelope of UnField<NTL::zz_p> field"))
78 pass = false;
79 #endif
80
81 commentator().stop("NTL_zz_p field test suite");
82 return pass ? 0 : -1;
83 }
84
85 // Local Variables:
86 // mode: C++
87 // tab-width: 4
88 // indent-tabs-mode: nil
89 // c-basic-offset: 4
90 // End:
91 // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s
92