# HG changeset patch # User thomask # Date 1123964658 0 # Node ID ec5f4198256b81deb200bbffd791a77314acbe84 # Parent 07fab02ed0d21296df8adca128be27b0b8545604 updated .ofsettof tests Ben Hinkle 2005-07-04 news:dac0ps$1hh4$1@digitaldaemon.com diff -r 07fab02ed0d2 -r ec5f4198256b nocompile/o/offsetof_02.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/o/offsetof_02.d Sat Aug 13 20:24:18 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 17 + +module dstress.run.offsetof_02; + +class MyClass{ + int a; + int b; +} + +int main(){ + MyClass c; + + assert(c.a.offsetof >= 0); + assert(c.b.offsetof >= 0); + assert(c.a.offsetof != c.b.offsetof); + + return 0; +} diff -r 07fab02ed0d2 -r ec5f4198256b nocompile/offsetof_06.d --- a/nocompile/offsetof_06.d Sat Aug 13 20:02:23 2005 +0000 +++ b/nocompile/offsetof_06.d Sat Aug 13 20:24:18 2005 +0000 @@ -18,7 +18,7 @@ int main(){ MyClass o = new MyClass(); - assert(o.test.offsetof >= 0); + assert(MyClass.test.offsetof >= 0); return 0; } diff -r 07fab02ed0d2 -r ec5f4198256b nocompile/offsetof_74.d --- a/nocompile/offsetof_74.d Sat Aug 13 20:02:23 2005 +0000 +++ b/nocompile/offsetof_74.d Sat Aug 13 20:24:18 2005 +0000 @@ -11,5 +11,5 @@ module dstress.nocompile.offsetof_74; class A{ - size_t alignof; + size_t offsetof; } diff -r 07fab02ed0d2 -r ec5f4198256b nocompile/offsetof_75.d --- a/nocompile/offsetof_75.d Sat Aug 13 20:02:23 2005 +0000 +++ b/nocompile/offsetof_75.d Sat Aug 13 20:24:18 2005 +0000 @@ -11,7 +11,7 @@ module dstress.nocompile.offsetof_75; class A{ - static size_t alignof(){ + static size_t offsetof(){ return 0; } } diff -r 07fab02ed0d2 -r ec5f4198256b run/o/offsetof_79.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/offsetof_79.d Sat Aug 13 20:24:18 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.o.offsetof_79; + +class MyClass{ + int a; +} + +int main(){ + MyClass o = new MyClass(); + + assert(MyClass.test.offsetof >= 0); + + return 0; +} diff -r 07fab02ed0d2 -r ec5f4198256b run/offsetof_02.d --- a/run/offsetof_02.d Sat Aug 13 20:02:23 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -module dstress.run.offsetof_02; - -class MyClass{ - int a; - int b; -} - -int main(){ - MyClass c; - - assert(c.a.offsetof >= 0); - assert(c.b.offsetof >= 0); - assert(c.a.offsetof != c.b.offsetof); - - return 0; -}