Mercurial > projects > dstress
annotate run/html_line_ending_dos.html @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | 36bedfa079e6 |
children |
rev | line source |
---|---|
11 | 1 <html> |
2 <head><title>dstress: html_line_ending_dos</title></head> | |
3 <body><pre><CODE> | |
767
8bc1fdc33e0b
fixed typos in bug_cgcs_353_*3.d and html_line_ending_dos
thomask
parents:
756
diff
changeset
|
4 // __DSTRESS_TORTURE_BLOCK__ -release |
756 | 5 |
11 | 6 int main(){ |
7 try{ | |
8 assert(0); | |
9 }catch(Exception e){ | |
10 checkLineNumber(e); | |
11 return 0; | |
12 } | |
13 | |
14 return 1; | |
15 } | |
16 | |
111 | 17 /* |
18 * @WARNING@ this code depends on the phobos implementation. | |
11 | 19 * char[]s returned by wrong assertions have to look like: |
20 * "blah blah (linenumber) blah blah" | |
21 */ | |
22 void checkLineNumber(Object o){ | |
1560 | 23 string x=o.toString(); |
111 | 24 |
11 | 25 int start; |
1560 | 26 for(start=0; start<x.length; start++){if(x[start]=='('){break;}} |
11 | 27 |
28 int end; | |
1560 | 29 for(end=x.length-1; end>start; end--){if(x[end]==')'){break;}} |
11 | 30 |
31 assert(end-start==2); | |
1560 | 32 assert(x[start+1]=='8'); |
11 | 33 } |
34 </CODE></pre></body> | |
35 </html> |