From: Rico Tzschichholz Date: Thu, 2 Jul 2020 11:11:52 +0000 (+0200) Subject: tests: Don't use invalid syntax to declare local variable with array type X-Git-Tag: 0.46.12~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fe7aeb23d3ca6b4fcb62132711a017f8d348eee;p=thirdparty%2Fvala.git tests: Don't use invalid syntax to declare local variable with array type See https://gitlab.gnome.org/GNOME/vala/issues/942 --- diff --git a/tests/basic-types/arrays.vala b/tests/basic-types/arrays.vala index f4777a7a7..5d2bea15f 100644 --- a/tests/basic-types/arrays.vala +++ b/tests/basic-types/arrays.vala @@ -148,7 +148,7 @@ int[,,] nd_array_pass (int[,,] a, out int[,,] b) { } void test_nd_array () { - int[2,2,2] a = {{{1, 2}, {3, 4}}, {{5, 6}, {7, 8}}}; + int[,,] a = {{{1, 2}, {3, 4}}, {{5, 6}, {7, 8}}}; assert (a[1,0,1] == 6); int[,,] b, c; @@ -162,7 +162,7 @@ void test_nd_array () { assert (c.length[2] == 2); assert (c[0,1,1] == 4); - string[1,2,3] s = {{{"a", "b", "c"}, {"d", "e", "f"}}}; + string[,,] s = {{{"a", "b", "c"}, {"d", "e", "f"}}}; assert (s[0,0,2] == "c"); } diff --git a/tests/objects/bug778632.vala b/tests/objects/bug778632.vala index cd7880168..e4c91ad51 100644 --- a/tests/objects/bug778632.vala +++ b/tests/objects/bug778632.vala @@ -2,7 +2,7 @@ class Foo : Object { public signal void bar (int[,,] a); public void bar_emit () { - int[2,3,2] a = {{{1, 2}, {3, 4}, {5, 6}}, {{7, 8}, {9, 10}, {11, 12}}}; + int[,,] a = {{{1, 2}, {3, 4}, {5, 6}}, {{7, 8}, {9, 10}, {11, 12}}}; bar (a); } }