Mercurial > projects > dstress
changeset 310:49b0654b9881
updated align tests to dmd-118
author | thomask |
---|---|
date | Wed, 16 Mar 2005 10:43:45 +0000 |
parents | 174de95adb17 |
children | 35a1df98caf1 |
files | nocompile/align_01.d nocompile/align_03.d nocompile/align_05.d run/align_06.d |
diffstat | 4 files changed, 0 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- 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; -}
--- 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(); -}
--- 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; - } -}
--- 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; -}