# HG changeset patch # User Anders Johnsen # Date 1209662782 -7200 # Node ID 688b516408cda62a9991ff0eda5f655d0d7ae94a # Parent 381975d76baf692ab5c7def539cacd138075973f Added 3 new small tests. diff -r 381975d76baf -r 688b516408cd tests/code/cast_1.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/code/cast_1.d Thu May 01 19:26:22 2008 +0200 @@ -0,0 +1,12 @@ + +int main() +{ + byte y = 44; + + int b = cast(int)y * 66; + + if(b == 2904) + return 0; + else + return 1; +} diff -r 381975d76baf -r 688b516408cd tests/code/cast_2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/code/cast_2.d Thu May 01 19:26:22 2008 +0200 @@ -0,0 +1,14 @@ + + + +int main() +{ + byte y = 44; + + int b = y * cast(byte)66; + + if(b == 88) + return 0; + else + return 1; +} diff -r 381975d76baf -r 688b516408cd tests/code/func_1.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/code/func_1.d Thu May 01 19:26:22 2008 +0200 @@ -0,0 +1,19 @@ + + +int main() +{ + testStruct t; + t.x = 5; + + return t.x; +} + +testStruct m(testStruct t) +{ + t.x = t.x - 5; +} + +struct testStruct +{ + int x; +}