3 * Copyright (C) 1999-2006 by Digital Mars, www.digitalmars.com
4 * Written by Walter Bright
6 * This software is provided 'as-is', without any express or implied
7 * warranty. In no event will the authors be held liable for any damages
8 * arising from the use of this software.
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute it
12 * freely, in both source and binary form, subject to the following
15 * o The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software
17 * in a product, an acknowledgment in the product documentation would be
18 * appreciated but is not required.
19 * o Altered source versions must be plainly marked as such, and must not
20 * be misrepresented as being the original software.
21 * o This notice may not be removed or altered from any source
25 // This test program pulls in all the library modules in order
26 // to run the unit tests on them.
27 // Then, it prints out the arguments passed to main().
57 int main(char[][] args
)
60 // Bring in unit test for module by referencing function in it
62 cmp("foo", "bar"); // string
64 fncharmatch('a', 'b'); // path
66 std
.math2
.feq(1.0, 2.0); // math2
67 std
.conv
.toDouble("1.0"); // std.conv
69 OutBuffer b
= new OutBuffer(); // outbuffer
70 std
.ctype
.tolower('A'); // ctype
71 RegExp r
= new RegExp(null, null); // regexp
77 std
.date
.getUTCtime(); // date
78 Exception e
= new ReadException(""); // stream
80 isValidDchar(cast(dchar)0); // utf
81 std
.uri
.ascii2hex(0); // uri
82 std
.zlib
.adler32(0,null); // D.zlib
87 writefln("hello world!"); // std.format
93 printf("re = %Lg, im = %Lg\n", c
.re
, c
.im
);
96 printf("hello world\n");
97 printf("args.length = %d\n", args
.length
);
98 for (int i
= 0; i
< args
.length
; i
++)
99 printf("args[%d] = '%s'\n", i
, cast(char *)args
[i
]);
110 std
.demangle
.demangle("hello");
112 BitArray ba
; // std.bitarray
116 std
.uni
.isUniAlpha('A');
118 std
.file
.exists("foo");
120 foreach_reverse (dchar d
; "hello"c
) { ; }
121 foreach_reverse (k
, dchar d
; "hello"c
) { ; }
123 std
.signals
.linkin();
125 writefln(std
.cpuid.toString());
127 printf("Success!\n");