1 /**
2 Test the correctness and performance of the `checkedint` package.
3 
4 Copyright: Copyright Thomas Stuart Bockman 2015
5 License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6 Authors: Thomas Stuart Bockman
7 **/
8 module checkedint.tests;
9 static import safeOp = checkedint.tests.contract.safeop;
10 static import smartOp = checkedint.tests.contract.smartop;
11 import checkedint.tests.benchmark;
12 
13 void main()
14 {
15     import std.stdio;
16 
17     void compiledMsg(string name)
18     {
19         writefln("Compiled with %s %s-bit, version %s.", name, size_t.sizeof * 8, __VERSION__);
20     }
21     version(DigitalMars) { compiledMsg("DMD"); }
22     version(GNU)         { compiledMsg("GDC"); }
23     version(LDC)         { compiledMsg("LDC"); }
24     version(SDC)         { compiledMsg("SDC"); }
25 
26     debug { writeln("This is a DEBUG build. Inlining and optimizations are required for good performance."); }
27 
28     safeOp.all();
29     smartOp.all();
30 
31     benchMacro();
32 }