1 void test_integer_array () {
2 // declaration and initialization
4 assert (a
.length
== 1);
9 assert (a
.length
== 2);
15 assert (b
.length
== 2);
21 assert (a
.length
== 3);
25 assert (b
.length
== 2);
30 void test_string_array () {
31 // declaration and initialization
32 string[] a
= { "hello" };
33 assert (a
.length
== 1);
34 assert (a
[0] == "hello");
37 a
= { "hello", "world" };
38 assert (a
.length
== 2);
39 assert (a
[0] == "hello");
40 assert (a
[1] == "world");
44 assert (b
.length
== 2);
45 assert (b
[0] == "hello");
46 assert (b
[1] == "world");
49 int[] pass_helper (int[] a
, out int[] b
) {
54 void test_array_pass () {
56 a
= pass_helper ({ 42 }, out b
);
57 assert (a
.length
== 2);
60 assert (b
.length
== 1);
65 test_integer_array ();