| 1 |
// PERMUTE_ARGS: |
| 2 |
|
| 3 |
// $HeadURL$ |
| 4 |
// $Date$ |
| 5 |
// $Author$ |
| 6 |
|
| 7 |
module dstress.run.line_token_03; |
| 8 |
|
| 9 |
import core.exception; |
| 10 |
|
| 11 |
int main(){ |
| 12 |
try{ |
| 13 |
#line 1 "" |
| 14 |
assert(0); |
| 15 |
}catch(AssertError o){ |
| 16 |
checkFileSpec(o); |
| 17 |
return 0; |
| 18 |
} |
| 19 |
|
| 20 |
assert(0); |
| 21 |
} |
| 22 |
|
| 23 |
/* |
| 24 |
* @WARNING@: this code depends on the phobos implementation. |
| 25 |
* char[]s returned by wrong assertions have to look like: |
| 26 |
* "blah blah "filename" blah blah" |
| 27 |
*/ |
| 28 |
void checkFileSpec(Object o){ |
| 29 |
string str=o.toString(); |
| 30 |
|
| 31 |
int start; |
| 32 |
for(start=0; start<str.length; start++){ |
| 33 |
if(str[start]=='('){ |
| 34 |
break; |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
assert(str[start .. start+3]=="(1)"); |
| 39 |
} |