# HG changeset patch # User thomask # Date 1110969825 0 # Node ID 49b0654b9881dd3214581a37593c1ebbf9561e84 # Parent 174de95adb17be17abf89ae6d8745fc85628618f updated align tests to dmd-118 diff -r 174de95adb17 -r 49b0654b9881 nocompile/align_01.d --- a/nocompile/align_01.d Wed Mar 16 10:33:13 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -// according to the documentation align can only be applied to struct members -module dstress.nocompile.align_01; - -align (1) int check(){ - return 5; -} diff -r 174de95adb17 -r 49b0654b9881 nocompile/align_03.d --- a/nocompile/align_03.d Wed Mar 16 10:33:13 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -// according to the documentation align can only be applied to struct members -module dstress.nocompile.align_03; - -align (1) struct MyStruct{ - int a; - byte* b; - int c(); -} diff -r 174de95adb17 -r 49b0654b9881 nocompile/align_05.d --- a/nocompile/align_05.d Wed Mar 16 10:33:13 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -// according to the documentation align can only be applied to struct members - -module dstress.nocompile.align_05; - -align (2) class MyClass{ - int a; - byte* b; - int c(){ - return 8; - } -} diff -r 174de95adb17 -r 49b0654b9881 run/align_06.d --- a/run/align_06.d Wed Mar 16 10:33:13 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -module dtress.run.align_06; - -struct SmallStruct{ - align(1) byte a; - align(1) byte b; -} - -struct BigStruct{ - align(4) byte e; - align(4) byte f; -} - -int main(){ - SmallStruct s; - BigStruct S; - assert(&s.b-&s.a==1); - assert(&S.f-&S.e==4); - - return 0; -}