3 extern(C) int printf(const char*, ...);
5 /************************************************/
6 // These seem to be the original tests for $ (originally 'length').
28 assert(foo[$ - 1] == 5);
35 assert(bar(foo)[$ * 2 - 1 - $] == 4);
45 bar(foo)[1 .. $ * 3 - $ - $] = 2;
53 a[0..$] = foo[0..$-1];
58 a[0..$] = bar(foo)[0..$];
66 int[4] f; int[] foo = f;
75 assert(foo[$ - 1] == 5);
82 assert(bar(foo)[$ * 2 - 1 - $] == 4);
92 bar(foo)[1 .. $ * 3 - $ - $] = 2;
100 a[0..$] = foo[0..$-1];
105 a[0..$] = bar(foo)[0..$];
113 /************************************************/
124 assert(info.fIcon == true);
128 /************************************************/
158 /************************************************/
162 int function (int i) x = function int (int i) { return i * 2; };
163 int function (int i) y = function int (int i) { return i / 2; };
173 /************************************************/
177 void next(ref int test)
179 void work (int input)
181 printf("work(%d, %d)\n", input, test);
193 Parser parser = new Parser();
197 printf("test %d\n", test);
202 /************************************************/
204 void foo6(out int bar)
217 /************************************************/
232 assert(u[0] == 0x20);
233 assert(u[1] == 0x20);
237 /************************************************/
251 /************************************************/
258 void len9(float x, float y, float z, float t)
266 a[0] = a[1] = a[2] = a[3] = 0.0f;
268 for (int y = 0; y < 7; ++y)
270 len9(a[0], a[1], a[2], a[3]);
272 float justOne() { return 1.0f; }
274 float dot = justOne();
280 /************************************************/
286 *cast(float*)(&arr10[0]) = 3.25;
291 uint result = *cast(uint*)&arr10[0];
297 uint result = bar10();
298 return *cast(float*)&result;
310 /************************************************/
324 void M () { printf("A.M()\n"); }
329 void N () { printf("B.N()\n"); }
340 /************************************************/
350 printf ("static constructor\n");
356 printf ("class constructor\n");
367 /************************************************/