| 1 |
// PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g |
| 2 |
// EXTRA_SOURCES: imports/test3a.d imports/test3b.d |
| 3 |
|
| 4 |
import imports.test3a; |
| 5 |
|
| 6 |
extern(C) int printf(const char*, ...); |
| 7 |
|
| 8 |
class Foo |
| 9 |
{ |
| 10 |
string bar; |
| 11 |
|
| 12 |
unittest |
| 13 |
{ |
| 14 |
printf("in Foo.unittest()\n"); |
| 15 |
} |
| 16 |
} |
| 17 |
|
| 18 |
|
| 19 |
void test(int a) |
| 20 |
{ |
| 21 |
} |
| 22 |
|
| 23 |
void test(uint b) |
| 24 |
{ |
| 25 |
} |
| 26 |
|
| 27 |
|
| 28 |
int main(string[] args) |
| 29 |
{ |
| 30 |
Foo a = new Foo; |
| 31 |
string baz = "lolo"; |
| 32 |
|
| 33 |
test(3); |
| 34 |
a.bar = "hello"; |
| 35 |
a.bar = baz ~ "betty"; |
| 36 |
|
| 37 |
printf("a.bar = '%.*s'\n", cast(int)a.bar.length, a.bar.ptr); |
| 38 |
assert(a.bar == "lolobetty"); |
| 39 |
return 0; |
| 40 |
} |