Mercurial > projects > ldc
comparison runalltests.d @ 11:d3ee9efe20e2 trunk
[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
* Now 50/51 tests compile.
* Added a simple runalltests.d scripts that should be run with 'gdmd -run runalltests.d' - LLVMDC will not compile it yet.
author | lindquist |
---|---|
date | Tue, 02 Oct 2007 05:10:18 +0200 |
parents | |
children | ee302fe07296 |
comparison
equal
deleted
inserted
replaced
10:c0f2c47e5034 | 11:d3ee9efe20e2 |
---|---|
1 module runalltests; | |
2 | |
3 import std.file; | |
4 import std.path; | |
5 import std.process; | |
6 import std.stdio; | |
7 | |
8 int main(string[] args) { | |
9 string[] good; | |
10 string[] bad; | |
11 | |
12 auto contents = listdir("test", "*.d"); | |
13 foreach(c; contents) { | |
14 if (system("./tester.sh "~getName(c)~" ll") != 0) { | |
15 bad ~= c; | |
16 } | |
17 else { | |
18 good ~= c; | |
19 } | |
20 } | |
21 | |
22 int ret = 0; | |
23 if (bad.length > 0) { | |
24 writefln(bad.length, '/', contents.length, " tests failed:"); | |
25 foreach(b; bad) { | |
26 writefln(" ",b); | |
27 } | |
28 ret = 1; | |
29 } | |
30 | |
31 writefln(good.length, '/', contents.length, " tests passed"); | |
32 return ret; | |
33 } |