annotate run/unittest_08.d @ 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 1e6afb94ce6d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
1 // $HeadURL$
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
2 // $Date$
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
3 // $Author$
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
4
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
5 // Unit tests are run in the lexical order in which they appear
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
6 // within a module
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
7
736
1e6afb94ce6d updated meta data for Torture
thomask
parents: 528
diff changeset
8 // __DSTRESS_TORTURE_BLOCK__ -release
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
9 // __DSTRESS_DFLAGS__ -unittest
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
10
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
11 module dstress.run.unittest_08;
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
12
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
13 int status;
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
14 int mixinCount;
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
15
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
16 static this(){
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
17 assert(status==0);
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
18 status++;
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
19 }
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
20
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
21 unittest{
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
22 assert(status==1);
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
23 status++;
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
24 }
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
25
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
26 template Templ(T){
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
27 int dummy;
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
28 unittest{
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
29 assert(status==3+(mixinCount++));
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
30 status++;
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
31 }
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
32 }
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
33
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
34 class MyClass{
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
35 unittest{
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
36 assert(status==2);
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
37 status++;
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
38 }
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
39
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
40 mixin Templ!(int);
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
41 }
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
42
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
43 mixin Templ!(int);
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
44
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
45 mixin Templ!(void);
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
46
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
47 int main(){
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 434
diff changeset
48 assert(status==6);
434
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
49 return 0;
6a553efddc73 updated unittest and file handling to dmd-0.121
thomask
parents:
diff changeset
50 }