Mercurial > projects > ldc
annotate test/cond.d @ 275:665b81613475 trunk
[svn r296] Removed: the 'suite' dir, it never took off!
Fixed: foreach statement, key-type checks were buggy.
Fixed: setting LLVMDC versions on the command line is now an error.
Fixed: array compare runtime had incorrect param attrs on call.
Fixed: index expressions on dynamic array slices w/o storage was broken.
Fixed: scope classes had incorrect finalization in some cases.
Fixed: when outputting !ClassInfoS !OffsetTypeInfoS, static class members were trying to be included, crashing the compiler.
Fixed: calling LLVMDC with -inline but not any -O option caused assertion failure.
Changed: the runtime now uses a single interface to "get" to !TypeInfoS, part of eliminating duplicate !TypeInfo codegen.
author | lindquist |
---|---|
date | Thu, 19 Jun 2008 17:30:32 +0200 |
parents | d9d5d59873d8 |
children |
rev | line source |
---|---|
270
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
1
diff
changeset
|
1 extern(C) int printf(char*, ...); |
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
1
diff
changeset
|
2 |
1 | 3 version=AndAnd; |
4 version=OrOr; | |
5 | |
6 version(AndAnd) | |
7 void andand1() | |
8 { | |
9 int a,b; | |
10 a = 4; | |
11 b = 5; | |
12 assert(a == 4); | |
13 assert(b == 5); | |
14 assert(a+b == 9); | |
15 assert(a == 4 && b == 5); | |
16 assert(a != 3 && b == 5); | |
17 assert(a > 2); | |
18 assert(a < 54); | |
19 assert(a < b); | |
20 assert(a > b-2); | |
21 | |
22 int apb = a+b; | |
23 int amb = a*b; | |
24 assert(apb < amb && apb > a); | |
25 } | |
26 | |
27 version(OrOr) | |
28 void oror1() | |
29 { | |
30 int a,b; | |
31 a = 10; | |
32 b = 1000; | |
33 assert(a); | |
34 assert(b); | |
35 assert(a || b); | |
36 assert(a > b || a < b); | |
37 } | |
38 | |
39 void main() | |
40 { | |
41 printf("Conditionals test\n"); | |
42 version(AndAnd) andand1(); | |
43 version(OrOr) oror1(); | |
44 printf(" SUCCESS\n"); | |
45 } |