Mercurial > projects > ldc
annotate tests/mini/throw1.d @ 925:79e3d33e6d6e
Added X86-64 versioning
author | wilsonk@ubuntu |
---|---|
date | Tue, 03 Feb 2009 12:33:21 -0700 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
34 | 1 module throw1; |
2 | |
3 extern(C) int rand(); | |
4 | |
5 class C | |
6 { | |
7 } | |
8 | |
100 | 9 void func(bool b) |
34 | 10 { |
100 | 11 if (b) |
34 | 12 throw new C; |
13 } | |
14 | |
15 int main() | |
16 { | |
100 | 17 bool b = true; |
34 | 18 try |
19 { | |
100 | 20 func(b); |
34 | 21 } |
22 catch(Object) | |
23 { | |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
100
diff
changeset
|
24 return 0; |
34 | 25 } |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
100
diff
changeset
|
26 return 1; |
34 | 27 } |