Mercurial > projects > dstress
diff run/offsetof_07.d @ 177:dbb7a0ee8baf
updated results Linux (dmd-0.108, dmd-0.109)
author | thomask |
---|---|
date | Sun, 05 Dec 2004 23:02:16 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/offsetof_07.d Sun Dec 05 23:02:16 2004 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.nocompile.offsetof_07; + +struct MyStruct{ + int a; + int b; +} + +int main(){ + MyStruct s; + + assert(MyStruct.a.offsetof >= 0); + assert(MyStruct.b.offsetof >= 0); + assert(MyStruct.a.offsetof != MyStruct.b.offsetof); + + return 0; +}