Mercurial > projects > ldc
comparison tangotests/q.d @ 134:0dec7b3727ea trunk
[svn r138] forgot the latest tests
author | lindquist |
---|---|
date | Mon, 14 Jan 2008 05:32:24 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
133:44a95ac7368a | 134:0dec7b3727ea |
---|---|
1 class E : Exception | |
2 { | |
3 this(char[] msg) | |
4 { | |
5 super(msg); | |
6 } | |
7 | |
8 char[] toString() | |
9 { | |
10 return super.toString(); | |
11 } | |
12 } | |
13 | |
14 extern(C) int printf(char*, ...); | |
15 | |
16 void main() | |
17 { | |
18 auto e = new E("hello world"); | |
19 auto msg = e.toString(); | |
20 printf("message should be: '%.*s'\n", msg.length, msg.ptr); | |
21 throw e; | |
22 } |