Mercurial > projects > dstress
comparison run/opNeg_01.d @ 0:3269e4627918
init dstress
author | svnowner |
---|---|
date | Sat, 25 Sep 2004 22:33:30 +0000 |
parents | |
children | 3414705c41ac |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3269e4627918 |
---|---|
1 // $Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/opNeg_01.d,v 1.2 2004/09/22 23:48:32 th Exp $ | |
2 | |
3 class MyClass{ | |
4 int status; | |
5 | |
6 void opNeg(){ | |
7 status+=9; | |
8 } | |
9 } | |
10 | |
11 int main(){ | |
12 MyClass c = new MyClass(); | |
13 assert(c.status==0); | |
14 -c; | |
15 assert(c.status==9); | |
16 -c; | |
17 assert(c.status==18); | |
18 return 0; | |
19 } |