diff --git a/tangotests/c.d b/tangotests/c.d deleted file mode 100644 index f2e6b24f..00000000 --- a/tangotests/c.d +++ /dev/null @@ -1,25 +0,0 @@ -class Foo -{ - int i; -} - -class Bar : Foo -{ - int j; -} - -void func() -{ - scope c = new Bar; - func2(c); -} - -void func2(Bar c) -{ - c.i = 123; -} - -void main() -{ - func(); -} \ No newline at end of file diff --git a/tangotests/compile/d.d b/tangotests/compile/d.d deleted file mode 100644 index 06d8b6da..00000000 --- a/tangotests/compile/d.d +++ /dev/null @@ -1,8 +0,0 @@ -char* toStringz (char[] s) -{ - if (s.ptr) - if (! (s.length && s[$-1] is 0)) - s = s ~ '\0'; - return s.ptr; -} - diff --git a/tangotests/compile/g.d b/tangotests/compile/g.d deleted file mode 100644 index 3fbb0fe4..00000000 --- a/tangotests/compile/g.d +++ /dev/null @@ -1,9 +0,0 @@ -extern(C) -{ - private extern int integer; -} - -void func() -{ - integer++; -} \ No newline at end of file diff --git a/tangotests/e.d b/tangotests/e.d deleted file mode 100644 index f3837e1f..00000000 --- a/tangotests/e.d +++ /dev/null @@ -1,27 +0,0 @@ -extern(C) int printf(char*,...); - -class MyClass -{ - this(int i = 4) - { - inner = this.new InnerClass; - } - - class InnerClass : Object.Monitor - { - void lock() {} - void unlock() {} - } - - InnerClass inner; -} - -void func() -{ - scope c = new MyClass(42); -} - -void main() -{ - func(); -} \ No newline at end of file diff --git a/tangotests/f.d b/tangotests/f.d deleted file mode 100644 index 94e44af7..00000000 --- a/tangotests/f.d +++ /dev/null @@ -1,6 +0,0 @@ -extern(C) int printf(char*,...); - -void main() -{ - printf("Hello World!\n"); -} diff --git a/tangotests/fail/p.d b/tangotests/fail/p.d deleted file mode 100644 index a1206fc3..00000000 --- a/tangotests/fail/p.d +++ /dev/null @@ -1,18 +0,0 @@ -extern(C) int printf(char*, ...); - -int main(char[][] args) -{ - printf("getint\n"); - int i = getint(); - printf("assert true\n"); - assert(i == 1234); - printf("assert false\n"); - assert(i != 1234); - printf("return\n"); - return 0; -} - -int getint() -{ - return 1234; -} diff --git a/tangotests/fail/q.d b/tangotests/fail/q.d deleted file mode 100644 index 1365ab6d..00000000 --- a/tangotests/fail/q.d +++ /dev/null @@ -1,22 +0,0 @@ -class E : Exception -{ - this(char[] msg) - { - super(msg); - } - - char[] toString() - { - return super.toString(); - } -} - -extern(C) int printf(char*, ...); - -void main() -{ - auto e = new E("hello world"); - auto msg = e.toString(); - printf("message should be: '%.*s'\n", msg.length, msg.ptr); - throw e; -} diff --git a/tangotests/nested1.d b/tangotests/nested1.d deleted file mode 100644 index 9b901b39..00000000 --- a/tangotests/nested1.d +++ /dev/null @@ -1,12 +0,0 @@ -module tangotests.nested1; - -void main() -{ - int i = 42; - assert(i == 42); - void func() - { - assert(i == 42); - } - func(); -} diff --git a/test/fail1.d b/test/fail1.d deleted file mode 100644 index 10290ddd..00000000 --- a/test/fail1.d +++ /dev/null @@ -1,12 +0,0 @@ -module fail1; - -void func() -{ - float* fp; - float f = *fp; -} - -void main() -{ - func(); -} diff --git a/test/fail2.d b/test/fail2.d deleted file mode 100644 index 1c5eb51f..00000000 --- a/test/fail2.d +++ /dev/null @@ -1,27 +0,0 @@ -module fail2; - -void a() -{ - b(); -} - -void b() -{ - c(); -} - -void c() -{ - d(); -} - -void d() -{ - int* ip; - int i = *ip; -} - -void main() -{ - a(); -} diff --git a/test/a.d b/tests/mini/a.d similarity index 100% rename from test/a.d rename to tests/mini/a.d diff --git a/tangotests/a.d b/tests/mini/a_1.d similarity index 100% rename from tangotests/a.d rename to tests/mini/a_1.d diff --git a/test/aa1.d b/tests/mini/aa1.d similarity index 100% rename from test/aa1.d rename to tests/mini/aa1.d diff --git a/tangotests/aa1.d b/tests/mini/aa1_1.d similarity index 92% rename from tangotests/aa1.d rename to tests/mini/aa1_1.d index 727768ac..cb63f1d9 100644 --- a/tangotests/aa1.d +++ b/tests/mini/aa1_1.d @@ -1,4 +1,4 @@ -module tangotests.aa1; +module tangotests.aa1_1; extern(C) int printf(char*,...); diff --git a/test/aa2.d b/tests/mini/aa2.d similarity index 100% rename from test/aa2.d rename to tests/mini/aa2.d diff --git a/tests/mini/aa2_1.d b/tests/mini/aa2_1.d new file mode 100644 index 00000000..1cef493d --- /dev/null +++ b/tests/mini/aa2_1.d @@ -0,0 +1,12 @@ +module tangotests.aa2_1; + +int main() +{ + int[cdouble] x; + cdouble d=22.0+0.0i; + x[d] = 44; + if(44 != x[d]){ + assert(0); + } + return 0; +} diff --git a/test/aa3.d b/tests/mini/aa3.d similarity index 100% rename from test/aa3.d rename to tests/mini/aa3.d diff --git a/test/aa4.d b/tests/mini/aa4.d similarity index 100% rename from test/aa4.d rename to tests/mini/aa4.d diff --git a/test/aa5.d b/tests/mini/aa5.d similarity index 100% rename from test/aa5.d rename to tests/mini/aa5.d diff --git a/test/aa6.d b/tests/mini/aa6.d similarity index 100% rename from test/aa6.d rename to tests/mini/aa6.d diff --git a/tests/mini/align1.d b/tests/mini/align1.d new file mode 100644 index 00000000..ced1dfe7 --- /dev/null +++ b/tests/mini/align1.d @@ -0,0 +1,19 @@ +module tangotests.align1; + +extern(C) int printf(char*, ...); + +struct TLA +{ + char[3] tla; + char[] toString() { return tla; } + void dump() + { + printf("%.*s\n", 3, tla.ptr); + } +} + +void main() +{ + TLA fbi = TLA("FBI"); + fbi.dump(); +} diff --git a/test/alignment.d b/tests/mini/alignment.d similarity index 100% rename from test/alignment.d rename to tests/mini/alignment.d diff --git a/test/alloca1.d b/tests/mini/alloca1.d similarity index 100% rename from test/alloca1.d rename to tests/mini/alloca1.d diff --git a/test/arrayinit.d b/tests/mini/arrayinit.d similarity index 100% rename from test/arrayinit.d rename to tests/mini/arrayinit.d diff --git a/tests/mini/arrays1.d b/tests/mini/arrays1.d new file mode 100644 index 00000000..112b44f9 --- /dev/null +++ b/tests/mini/arrays1.d @@ -0,0 +1,43 @@ +module arrays1; + +extern(C) int printf(char*, ...); + +void integer() +{ + auto arr = new int[16]; + arr[1] = 42; + arr[6] = 555; + print_int(arr); + delete arr; +} + +void floating() +{ + auto arr = new float[6]; + arr[1] = 3.14159265; + arr[3] = 1.61803399; + print_float(arr); + delete arr; +} + +void print_int(int[] arr) +{ + printf("arr[%lu] = [", arr.length); + for (auto i=0; i>= 1; + } +} diff --git a/tangotests/m.d b/tests/mini/m.d similarity index 100% rename from tangotests/m.d rename to tests/mini/m.d diff --git a/test/mainargs1.d b/tests/mini/mainargs1.d similarity index 100% rename from test/mainargs1.d rename to tests/mini/mainargs1.d diff --git a/tangotests/marray1.d b/tests/mini/marray1.d similarity index 100% rename from tangotests/marray1.d rename to tests/mini/marray1.d diff --git a/tangotests/marray2.d b/tests/mini/marray2.d similarity index 100% rename from tangotests/marray2.d rename to tests/mini/marray2.d diff --git a/tangotests/marray3.d b/tests/mini/marray3.d similarity index 100% rename from tangotests/marray3.d rename to tests/mini/marray3.d diff --git a/tangotests/mem2.d b/tests/mini/mem2.d similarity index 100% rename from tangotests/mem2.d rename to tests/mini/mem2.d diff --git a/tangotests/mem3.d b/tests/mini/mem3.d similarity index 100% rename from tangotests/mem3.d rename to tests/mini/mem3.d diff --git a/tangotests/mem5.d b/tests/mini/mem5.d similarity index 100% rename from tangotests/mem5.d rename to tests/mini/mem5.d diff --git a/tangotests/mem6.d b/tests/mini/mem6.d similarity index 100% rename from tangotests/mem6.d rename to tests/mini/mem6.d diff --git a/test/memory1.d b/tests/mini/memory1.d similarity index 100% rename from test/memory1.d rename to tests/mini/memory1.d diff --git a/test/moduleinfo1.d b/tests/mini/moduleinfo1.d similarity index 100% rename from test/moduleinfo1.d rename to tests/mini/moduleinfo1.d diff --git a/test/moduleinfo2.d b/tests/mini/moduleinfo2.d similarity index 100% rename from test/moduleinfo2.d rename to tests/mini/moduleinfo2.d diff --git a/test/multiarr1.d b/tests/mini/multiarr1.d similarity index 100% rename from test/multiarr1.d rename to tests/mini/multiarr1.d diff --git a/test/multiarr2.d b/tests/mini/multiarr2.d similarity index 100% rename from test/multiarr2.d rename to tests/mini/multiarr2.d diff --git a/test/multiarr3.d b/tests/mini/multiarr3.d similarity index 100% rename from test/multiarr3.d rename to tests/mini/multiarr3.d diff --git a/test/multiarr4.d b/tests/mini/multiarr4.d similarity index 100% rename from test/multiarr4.d rename to tests/mini/multiarr4.d diff --git a/tangotests/n.d b/tests/mini/n.d similarity index 100% rename from tangotests/n.d rename to tests/mini/n.d diff --git a/test/neg.d b/tests/mini/neg.d similarity index 100% rename from test/neg.d rename to tests/mini/neg.d diff --git a/test/nested1.d b/tests/mini/nested1.d similarity index 100% rename from test/nested1.d rename to tests/mini/nested1.d diff --git a/test/nested10.d b/tests/mini/nested10.d similarity index 100% rename from test/nested10.d rename to tests/mini/nested10.d diff --git a/test/nested11.d b/tests/mini/nested11.d similarity index 100% rename from test/nested11.d rename to tests/mini/nested11.d diff --git a/test/nested12.d b/tests/mini/nested12.d similarity index 100% rename from test/nested12.d rename to tests/mini/nested12.d diff --git a/tangotests/nested2.d b/tests/mini/nested13.d similarity index 100% rename from tangotests/nested2.d rename to tests/mini/nested13.d diff --git a/test/nested2.d b/tests/mini/nested2.d similarity index 100% rename from test/nested2.d rename to tests/mini/nested2.d diff --git a/test/nested3.d b/tests/mini/nested3.d similarity index 100% rename from test/nested3.d rename to tests/mini/nested3.d diff --git a/test/nested4.d b/tests/mini/nested4.d similarity index 100% rename from test/nested4.d rename to tests/mini/nested4.d diff --git a/test/nested5.d b/tests/mini/nested5.d similarity index 100% rename from test/nested5.d rename to tests/mini/nested5.d diff --git a/test/nested6.d b/tests/mini/nested6.d similarity index 100% rename from test/nested6.d rename to tests/mini/nested6.d diff --git a/test/nested7.d b/tests/mini/nested7.d similarity index 100% rename from test/nested7.d rename to tests/mini/nested7.d diff --git a/test/nested8.d b/tests/mini/nested8.d similarity index 100% rename from test/nested8.d rename to tests/mini/nested8.d diff --git a/test/nested9.d b/tests/mini/nested9.d similarity index 100% rename from test/nested9.d rename to tests/mini/nested9.d diff --git a/tangotests/o.d b/tests/mini/o.d similarity index 100% rename from tangotests/o.d rename to tests/mini/o.d diff --git a/test/pointers.d b/tests/mini/pointers.d similarity index 100% rename from test/pointers.d rename to tests/mini/pointers.d diff --git a/test/pt.d b/tests/mini/pt.d similarity index 100% rename from test/pt.d rename to tests/mini/pt.d diff --git a/test/ptrarith.d b/tests/mini/ptrarith.d similarity index 100% rename from test/ptrarith.d rename to tests/mini/ptrarith.d diff --git a/tangotests/r.d b/tests/mini/r.d similarity index 100% rename from tangotests/r.d rename to tests/mini/r.d diff --git a/tangotests/s.d b/tests/mini/s.d similarity index 100% rename from tangotests/s.d rename to tests/mini/s.d diff --git a/test/scope1.d b/tests/mini/scope1.d similarity index 100% rename from test/scope1.d rename to tests/mini/scope1.d diff --git a/test/scope2.d b/tests/mini/scope2.d similarity index 100% rename from test/scope2.d rename to tests/mini/scope2.d diff --git a/test/scope3.d b/tests/mini/scope3.d similarity index 100% rename from test/scope3.d rename to tests/mini/scope3.d diff --git a/test/scope4.d b/tests/mini/scope4.d similarity index 100% rename from test/scope4.d rename to tests/mini/scope4.d diff --git a/test/scope5.d b/tests/mini/scope5.d similarity index 100% rename from test/scope5.d rename to tests/mini/scope5.d diff --git a/test/sieve.d b/tests/mini/sieve.d similarity index 100% rename from test/sieve.d rename to tests/mini/sieve.d diff --git a/test/slices.d b/tests/mini/slices.d similarity index 100% rename from test/slices.d rename to tests/mini/slices.d diff --git a/test/sqrts.d b/tests/mini/sqrts.d similarity index 100% rename from test/sqrts.d rename to tests/mini/sqrts.d diff --git a/test/static_ctor.d b/tests/mini/static_ctor.d similarity index 100% rename from test/static_ctor.d rename to tests/mini/static_ctor.d diff --git a/test/staticarrays.d b/tests/mini/staticarrays.d similarity index 100% rename from test/staticarrays.d rename to tests/mini/staticarrays.d diff --git a/test/staticvars.d b/tests/mini/staticvars.d similarity index 100% rename from test/staticvars.d rename to tests/mini/staticvars.d diff --git a/test/stdiotest.d b/tests/mini/stdiotest.d similarity index 100% rename from test/stdiotest.d rename to tests/mini/stdiotest.d diff --git a/test/stdiotest2.d b/tests/mini/stdiotest2.d similarity index 100% rename from test/stdiotest2.d rename to tests/mini/stdiotest2.d diff --git a/test/strings1.d b/tests/mini/strings1.d similarity index 100% rename from test/strings1.d rename to tests/mini/strings1.d diff --git a/test/strings2.d b/tests/mini/strings2.d similarity index 100% rename from test/strings2.d rename to tests/mini/strings2.d diff --git a/test/structinit.d b/tests/mini/structinit.d similarity index 100% rename from test/structinit.d rename to tests/mini/structinit.d diff --git a/test/structinit2.d b/tests/mini/structinit2.d similarity index 100% rename from test/structinit2.d rename to tests/mini/structinit2.d diff --git a/test/structs.d b/tests/mini/structs.d similarity index 100% rename from test/structs.d rename to tests/mini/structs.d diff --git a/test/structs2.d b/tests/mini/structs2.d similarity index 100% rename from test/structs2.d rename to tests/mini/structs2.d diff --git a/test/structs3.d b/tests/mini/structs3.d similarity index 100% rename from test/structs3.d rename to tests/mini/structs3.d diff --git a/test/structs4.d b/tests/mini/structs4.d similarity index 100% rename from test/structs4.d rename to tests/mini/structs4.d diff --git a/test/structs5.d b/tests/mini/structs5.d similarity index 100% rename from test/structs5.d rename to tests/mini/structs5.d diff --git a/test/structs6.d b/tests/mini/structs6.d similarity index 100% rename from test/structs6.d rename to tests/mini/structs6.d diff --git a/test/structs7.d b/tests/mini/structs7.d similarity index 100% rename from test/structs7.d rename to tests/mini/structs7.d diff --git a/test/switch1.d b/tests/mini/switch1.d similarity index 100% rename from test/switch1.d rename to tests/mini/switch1.d diff --git a/test/switch2.d b/tests/mini/switch2.d similarity index 100% rename from test/switch2.d rename to tests/mini/switch2.d diff --git a/test/switch3.d b/tests/mini/switch3.d similarity index 100% rename from test/switch3.d rename to tests/mini/switch3.d diff --git a/tests/mini/switch4.d b/tests/mini/switch4.d new file mode 100644 index 00000000..e04a98f3 --- /dev/null +++ b/tests/mini/switch4.d @@ -0,0 +1,8 @@ +module tangotests.switch1; + +void main() +{ + switch(0) + { + } +} diff --git a/tests/mini/switch5.d b/tests/mini/switch5.d new file mode 100644 index 00000000..afbe215b --- /dev/null +++ b/tests/mini/switch5.d @@ -0,0 +1,15 @@ +module tangotests.switch2; + +void main() +{ + int i=0; + switch(i) + { + case 0: + return; + case 1: + return; + default: + assert(0); + } +} diff --git a/tests/mini/switch6.d b/tests/mini/switch6.d new file mode 100644 index 00000000..27b92234 --- /dev/null +++ b/tests/mini/switch6.d @@ -0,0 +1,21 @@ +module tangotests.switch3; + +void main() +{ + int i = 2; + + switch(i) + { + case 0,1,4,5,6,7,8,9: + assert(0); + case 2: + return; + case 3: + { + i++; + case 11: + i++; + } + return; + } +} diff --git a/test/sync1.d b/tests/mini/sync1.d similarity index 100% rename from test/sync1.d rename to tests/mini/sync1.d diff --git a/tests/mini/sync1_1.d b/tests/mini/sync1_1.d new file mode 100644 index 00000000..eed77902 --- /dev/null +++ b/tests/mini/sync1_1.d @@ -0,0 +1,7 @@ +module tangotests.sync1; + +void main() +{ + size_t id; + synchronized id = 4; +} diff --git a/tests/mini/sync2.d b/tests/mini/sync2.d new file mode 100644 index 00000000..a2b2190d --- /dev/null +++ b/tests/mini/sync2.d @@ -0,0 +1,13 @@ +module tangotests.sync2; + +class Lock +{ +} + +Lock lock; + +void main() +{ + size_t id; + synchronized(lock) id = 2; +} diff --git a/tests/mini/sync3.d b/tests/mini/sync3.d new file mode 100644 index 00000000..ed218cc4 --- /dev/null +++ b/tests/mini/sync3.d @@ -0,0 +1,17 @@ +module tangotests.sync3; + +void main() +{ + int i = foo(); +} + +int foo() +{ + int res; + synchronized + { + scope(exit) res--; + res++; + return res; + } +} diff --git a/tangotests/t.d b/tests/mini/t.d similarity index 100% rename from tangotests/t.d rename to tests/mini/t.d diff --git a/test/templ1.d b/tests/mini/templ1.d similarity index 100% rename from test/templ1.d rename to tests/mini/templ1.d diff --git a/test/templ2.d b/tests/mini/templ2.d similarity index 100% rename from test/templ2.d rename to tests/mini/templ2.d diff --git a/test/terms.d b/tests/mini/terms.d similarity index 100% rename from test/terms.d rename to tests/mini/terms.d diff --git a/test/throw1.d b/tests/mini/throw1.d similarity index 86% rename from test/throw1.d rename to tests/mini/throw1.d index 7d3dc835..d78ccbd9 100644 --- a/test/throw1.d +++ b/tests/mini/throw1.d @@ -21,7 +21,7 @@ int main() } catch(Object) { - return 1; + return 0; } - return 0; + return 1; } diff --git a/test/tuple1.d b/tests/mini/tuple1.d similarity index 100% rename from test/tuple1.d rename to tests/mini/tuple1.d diff --git a/test/typeinfo.d b/tests/mini/typeinfo.d similarity index 100% rename from test/typeinfo.d rename to tests/mini/typeinfo.d diff --git a/test/typeinfo10.d b/tests/mini/typeinfo10.d similarity index 100% rename from test/typeinfo10.d rename to tests/mini/typeinfo10.d diff --git a/test/typeinfo11.d b/tests/mini/typeinfo11.d similarity index 100% rename from test/typeinfo11.d rename to tests/mini/typeinfo11.d diff --git a/test/typeinfo12.d b/tests/mini/typeinfo12.d similarity index 100% rename from test/typeinfo12.d rename to tests/mini/typeinfo12.d diff --git a/test/typeinfo13.d b/tests/mini/typeinfo13.d similarity index 100% rename from test/typeinfo13.d rename to tests/mini/typeinfo13.d diff --git a/test/typeinfo2.d b/tests/mini/typeinfo2.d similarity index 100% rename from test/typeinfo2.d rename to tests/mini/typeinfo2.d diff --git a/test/typeinfo3.d b/tests/mini/typeinfo3.d similarity index 100% rename from test/typeinfo3.d rename to tests/mini/typeinfo3.d diff --git a/test/typeinfo4.d b/tests/mini/typeinfo4.d similarity index 100% rename from test/typeinfo4.d rename to tests/mini/typeinfo4.d diff --git a/test/typeinfo5.d b/tests/mini/typeinfo5.d similarity index 100% rename from test/typeinfo5.d rename to tests/mini/typeinfo5.d diff --git a/test/typeinfo6.d b/tests/mini/typeinfo6.d similarity index 100% rename from test/typeinfo6.d rename to tests/mini/typeinfo6.d diff --git a/test/typeinfo7.d b/tests/mini/typeinfo7.d similarity index 100% rename from test/typeinfo7.d rename to tests/mini/typeinfo7.d diff --git a/test/typeinfo8.d b/tests/mini/typeinfo8.d similarity index 100% rename from test/typeinfo8.d rename to tests/mini/typeinfo8.d diff --git a/test/typeinfo9.d b/tests/mini/typeinfo9.d similarity index 100% rename from test/typeinfo9.d rename to tests/mini/typeinfo9.d diff --git a/test/union1.d b/tests/mini/union1.d similarity index 100% rename from test/union1.d rename to tests/mini/union1.d diff --git a/test/union2.d b/tests/mini/union2.d similarity index 100% rename from test/union2.d rename to tests/mini/union2.d diff --git a/test/union3.d b/tests/mini/union3.d similarity index 100% rename from test/union3.d rename to tests/mini/union3.d diff --git a/test/union4.d b/tests/mini/union4.d similarity index 100% rename from test/union4.d rename to tests/mini/union4.d diff --git a/test/union5.d b/tests/mini/union5.d similarity index 100% rename from test/union5.d rename to tests/mini/union5.d diff --git a/test/union6.d b/tests/mini/union6.d similarity index 100% rename from test/union6.d rename to tests/mini/union6.d diff --git a/test/union7.d b/tests/mini/union7.d similarity index 100% rename from test/union7.d rename to tests/mini/union7.d diff --git a/test/unittest1.d b/tests/mini/unittest1.d similarity index 100% rename from test/unittest1.d rename to tests/mini/unittest1.d diff --git a/test/unrolled.d b/tests/mini/unrolled.d similarity index 100% rename from test/unrolled.d rename to tests/mini/unrolled.d diff --git a/test/v2d.d b/tests/mini/v2d.d similarity index 100% rename from test/v2d.d rename to tests/mini/v2d.d diff --git a/test/vararg1.d b/tests/mini/vararg1.d similarity index 100% rename from test/vararg1.d rename to tests/mini/vararg1.d diff --git a/test/vararg2.d b/tests/mini/vararg2.d similarity index 100% rename from test/vararg2.d rename to tests/mini/vararg2.d diff --git a/test/vararg3.d b/tests/mini/vararg3.d similarity index 100% rename from test/vararg3.d rename to tests/mini/vararg3.d diff --git a/test/vararg4.d b/tests/mini/vararg4.d similarity index 100% rename from test/vararg4.d rename to tests/mini/vararg4.d diff --git a/test/vararg5.d b/tests/mini/vararg5.d similarity index 100% rename from test/vararg5.d rename to tests/mini/vararg5.d diff --git a/tangotests/vararg3.d b/tests/mini/vararg6.d similarity index 100% rename from tangotests/vararg3.d rename to tests/mini/vararg6.d diff --git a/tangotests/vararg4.d b/tests/mini/vararg7.d similarity index 100% rename from tangotests/vararg4.d rename to tests/mini/vararg7.d diff --git a/test/virtcall.d b/tests/mini/virtcall.d similarity index 100% rename from test/virtcall.d rename to tests/mini/virtcall.d diff --git a/tests/mini/void1.d b/tests/mini/void1.d new file mode 100644 index 00000000..4be15b7b --- /dev/null +++ b/tests/mini/void1.d @@ -0,0 +1,11 @@ +extern(C) int printf(char*, ...); + +void main() +{ + int[0][10] arr; + printf("%u\n", &arr[9] - &arr[0]); + int[0] arr1; + printf("%p\n", &arr1); + void[0] arr2; + printf("%p\n", &arr2); +} diff --git a/test/with1.d b/tests/mini/with1.d similarity index 100% rename from test/with1.d rename to tests/mini/with1.d diff --git a/tests/minicomplex/arrays1.d b/tests/minicomplex/arrays1.d new file mode 100644 index 00000000..82e97b2c --- /dev/null +++ b/tests/minicomplex/arrays1.d @@ -0,0 +1,78 @@ +module tangotests.arrays1; + +import tango.stdc.stdio; + +void main() +{ + real[] arr; + print(arr); + main2(); +} + +void main2() +{ + real[] arr = void; + fill(arr); + print(arr); + main3(); +} + +void main3() +{ +} + +void print(real[] arr) +{ + printf("len=%u ; ptr=%p\n", arr.length, arr.ptr); +} + +void fill(ref real[] arr) +{ + auto ptr = cast(void**)&arr; + *ptr++ = cast(void*)0xbeefc0de; + *ptr = cast(void*)0xbeefc0de; +} + +void dg1(void delegate(int[]) dg) +{ + dg2(dg); +} + +void dg2(void delegate(int[]) dg) +{ + dg(null); +} + +void sarr1(int[16] sa) +{ + sarr1(sa); +} + +struct Str +{ + size_t length; + char* ptr; +} + +void str1(Str str) +{ + str1(str); +} + +void str2(ref Str str) +{ + str2(str); +} + +void str3(out Str str) +{ + str3(str); +} + +void str4(Str* str) +{ + str4(str); +} + +void str5(Str); + diff --git a/tangotests/constructors.d b/tests/minicomplex/constructors.d similarity index 100% rename from tangotests/constructors.d rename to tests/minicomplex/constructors.d diff --git a/tangotests/files1.d b/tests/minicomplex/files1.d similarity index 100% rename from tangotests/files1.d rename to tests/minicomplex/files1.d diff --git a/tests/minicomplex/gc2.d b/tests/minicomplex/gc2.d new file mode 100644 index 00000000..057408b5 --- /dev/null +++ b/tests/minicomplex/gc2.d @@ -0,0 +1,9 @@ +module tangotests.gc2; + +import tango.core.Memory; + +void main() +{ + char[] tmp = new char[2500]; + GC.collect(); +} diff --git a/tests/minicomplex/ina1.d b/tests/minicomplex/ina1.d new file mode 100644 index 00000000..483e882c --- /dev/null +++ b/tests/minicomplex/ina1.d @@ -0,0 +1,11 @@ +module tangotests.ina1; + +import tango.stdc.stdio; + +void main() +{ + int alder; + printf("Hvor gammel er du?\n"); + scanf("%d", &alder); + printf("om 10 år er du %d\n", alder + 10); +} diff --git a/tangotests/l.d b/tests/minicomplex/l.d similarity index 100% rename from tangotests/l.d rename to tests/minicomplex/l.d diff --git a/tangotests/mem1.d b/tests/minicomplex/mem1.d similarity index 100% rename from tangotests/mem1.d rename to tests/minicomplex/mem1.d diff --git a/tangotests/mem4.d b/tests/minicomplex/mem4.d similarity index 100% rename from tangotests/mem4.d rename to tests/minicomplex/mem4.d diff --git a/tangotests/stdout1.d b/tests/minicomplex/stdout1.d similarity index 100% rename from tangotests/stdout1.d rename to tests/minicomplex/stdout1.d diff --git a/tangotests/stdout2.d b/tests/minicomplex/stdout2.d similarity index 100% rename from tangotests/stdout2.d rename to tests/minicomplex/stdout2.d diff --git a/tangotests/templ1.d b/tests/minicomplex/templ1.d similarity index 100% rename from tangotests/templ1.d rename to tests/minicomplex/templ1.d diff --git a/tangotests/u.d b/tests/minicomplex/u.d similarity index 100% rename from tangotests/u.d rename to tests/minicomplex/u.d diff --git a/tangotests/vararg1.d b/tests/minicomplex/vararg1.d similarity index 100% rename from tangotests/vararg1.d rename to tests/minicomplex/vararg1.d diff --git a/tangotests/vararg2.d b/tests/minicomplex/vararg2.d similarity index 100% rename from tangotests/vararg2.d rename to tests/minicomplex/vararg2.d diff --git a/tangotests/volatile1.d b/tests/minicomplex/volatile1.d similarity index 100% rename from tangotests/volatile1.d rename to tests/minicomplex/volatile1.d diff --git a/runalltests.d b/tests/runminitest.d similarity index 96% rename from runalltests.d rename to tests/runminitest.d index b8ea00de..cdb2226a 100644 --- a/runalltests.d +++ b/tests/runminitest.d @@ -1,4 +1,4 @@ -module runalltests; +module runminitest; import std.file; import std.path; @@ -9,7 +9,7 @@ int main(string[] args) { string[] bad; string[] badrun; - chdir("test"); + chdir("mini"); auto contents = listdir(".", "*.d"); foreach(c; contents) {