d: Merge upstream dmd 47871363d, druntime, c52e28b7, phobos 99e9c1b77.
[official-gcc.git] / gcc / testsuite / gdc.test / runnable / test3.d
blob36c1aa3ea6e28f530416c834af9082cc3f594cf2
1 // PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g
2 // EXTRA_SOURCES: imports/test3a.d imports/test3b.d
4 import imports.test3a;
6 extern(C) int printf(const char*, ...);
8 class Foo
10 string bar;
12 unittest
14 printf("in Foo.unittest()\n");
19 void test(int a)
23 void test(uint b)
28 int main(string[] args)
30 Foo a = new Foo;
31 string baz = "lolo";
33 test(3);
34 a.bar = "hello";
35 a.bar = baz ~ "betty";
37 printf("a.bar = '%.*s'\n", cast(int)a.bar.length, a.bar.ptr);
38 assert(a.bar == "lolobetty");
39 return 0;