annotate run/b/bug_expression_5818_A.d @ 1489:b8c0195059d9

changed nntp: URLs to http: URLs
author thomask
date Mon, 09 Apr 2007 13:47:01 +0000
parents 03b5056496f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
689
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
1 // $HeadURL$
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
2 // $Date$
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
3 // $Author$
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
4
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
5 // @author@ David Medlock <noone@nowhere.com>
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
6 // @date@ 2005-09-27
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 1089
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5076
689
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
8
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
9 module dstress.run.b.bug_expression_5818_A;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
10
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
11 int status;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
12
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
13 void add( MyStruct val ){
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
14 uint test = 1;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
15 if ( test > val.value ){
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
16 status = -1;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
17 } else {
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
18 status = 1;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
19 }
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
20 }
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
21
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
22 struct MyStruct{
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
23 int value;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
24 }
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
25
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
26 int main(){
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
27 MyStruct s;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
28
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
29 s.value = 2;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
30 add(s);
1089
03b5056496f1 pre DMD-0.163 review
thomask
parents: 689
diff changeset
31 if(status != 1){
03b5056496f1 pre DMD-0.163 review
thomask
parents: 689
diff changeset
32 assert(0);
03b5056496f1 pre DMD-0.163 review
thomask
parents: 689
diff changeset
33 }
689
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
34
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
35 s.value = 0;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
36 add(s);
1089
03b5056496f1 pre DMD-0.163 review
thomask
parents: 689
diff changeset
37 if(status != -1){
03b5056496f1 pre DMD-0.163 review
thomask
parents: 689
diff changeset
38 assert(0);
03b5056496f1 pre DMD-0.163 review
thomask
parents: 689
diff changeset
39 }
689
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
40
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
41 return 0;
eb2591f2163c David Medlock <noone@nowhere.com>
thomask
parents:
diff changeset
42 }