1 /* tests/test-gf2.C
2  * Copyright (C) 2003 Bradford Hovinen,
3  *
4  * Written by Bradford Hovinen <hovinen@cis.udel.edu>,
5  * Updated Mar2016 -bds
6  * ------------------------------------
7  * 2002-04-10 Bradford Hovinen <hovinen@cis.udel.edu>
8  *
9  * Rename from test-large-modular.C to test-modular.C; made other updates in
10  * accordance with changes to Givaro::Modular interace.
11  * ------------------------------------
12  *
13  *
14  * ========LICENCE========
15  * This file is part of the library LinBox.
16  *
17  * LinBox is free software: you can redistribute it and/or modify
18  * it under the terms of the  GNU Lesser General Public
19  * License as published by the Free Software Foundation; either
20  * version 2.1 of the License, or (at your option) any later version.
21  *
22  * This library is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25  * Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
30  * ========LICENCE========
31  *.
32  */
33 
34 /*! @file  tests/test-gf2.C
35  * @ingroup tests
36  * @brief  basic field functionality check
37  */
38 
39 #include "linbox/linbox-config.h"
40 #include "linbox/field/gf2.h"
41 #include "test-field.h"
42 
43 using namespace LinBox;
44 
main(int argc,char ** argv)45 int main (int argc, char **argv)
46 {
47 	static unsigned int n = 100;
48 
49 	static Argument args[] = {
50 		{ 'n', "-n N", "Set dimension of test vectors to NxN.",      TYPE_INT,     &n },
51 		END_OF_ARGUMENTS
52 	};
53 	parseArguments (argc, argv, args);
54 
55 	bool pass = true;
56 	commentator().start("GF2 field test suite", "GF2");
57 
58 	GF2 F;
59 
60 	pass = pass and testField (F, "GF2");
61 	pass = pass and runFieldTests (F, "GF2", 1, n, false);
62 
63 	commentator().stop("GF2 field test suite");
64 	return pass ? 0 : -1;
65 }
66 
67 // Local Variables:
68 // mode: C++
69 // tab-width: 4
70 // indent-tabs-mode: nil
71 // c-basic-offset: 4
72 // End:
73 // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s
74