File: testhtml2.html

package info (click to toggle)
ldc 1%3A1.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 80,880 kB
  • sloc: ansic: 123,899; cpp: 84,038; sh: 1,402; makefile: 1,083; asm: 919; objc: 65; exp: 30; python: 22
file content (36 lines) | stat: -rw-r--r-- 766 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!--
PERMUTE_ARGS: -d -dw
--><html>
	<head><title>dstress: html_line_ending_mac</title></head>
	<body><pre><CODE>
// __DSTRESS_TORTURE_BLOCK__ -release
 int main(){
	try{
		assert(0);
	}catch(Throwable e){
		checkLineNumber(e);
		return 0;
	}
	assert(-1, "b");
	return 1;
}

/*
 * @WARNING@ this code depends on the phobos implementation.
 * char[]s returned by wrong assertions have to look like:
 *	 "blah blah (linenumber) blah blah"
 */
void checkLineNumber(Object o){
	string x=o.toString();

	int start;
	for(start=0; start&lt;x.length; start++){if(x[start]=='('){break;}}

	int end;
	for(end=start+1; end&lt;x.length; end++){if(x[end]==')'){break;}}

	assert(end-start==3);
	assert(x[start+1 .. end]=="10", x[start+1 .. end]);
}
	</CODE></pre></body>
</html>