Fixed a few mini tests issues.

Added 'darwin' and 'Posix' as versions user can't set.
Fixed #80 .
This commit is contained in:
Tomas Lindquist Olsen
2008-09-11 21:10:15 +02:00
parent d474fa027a
commit bba1994b05
8 changed files with 60 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
module tangotests.arrays2;
module mini.arrays16;
void main()
{
+1 -1
View File
@@ -1,4 +1,4 @@
module tangotests.arrays3;
module mini.arrays17;
void main()
{
+1 -1
View File
@@ -1,4 +1,4 @@
module tangotests.arrays4;
module mini.arrays18;
struct Str { int a,b; }
void main() {
+9
View File
@@ -0,0 +1,9 @@
module mini.arrays19;
extern(C) int printf(char*, ...);
void main()
{
bool var = ([] is null);
assert(var);
}
+23
View File
@@ -0,0 +1,23 @@
module mini.arrays20;
int[] foo()
{
return [2,4,6];
}
int[] bar()
{
return [1,3,5];
}
void main()
{
auto a = foo();
auto b = bar();
assert(b[0] == 1);
assert(a[0] == 2);
assert(b[1] == 3);
assert(a[1] == 4);
assert(b[2] == 5);
assert(a[2] == 6);
}
+13
View File
@@ -0,0 +1,13 @@
module complex5;
void main()
{
cfloat c = 3+2i;
foo(c);
}
void foo(cfloat c)
{
assert(c.re > 2.9999 && c.re < 3.0001);
assert(c.im > 1.9999i && c.im < 2.0001);
}