[vala/staging: 2/3] tests: Don't use invalid syntax to declare local variable with array type
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/3] tests: Don't use invalid syntax to declare local variable with array type
- Date: Thu, 2 Jul 2020 12:07:52 +0000 (UTC)
commit ae236e514ab62562cbb04d5643ae84b29171ea1a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Jul 2 13:11:52 2020 +0200
tests: Don't use invalid syntax to declare local variable with array type
See https://gitlab.gnome.org/GNOME/vala/issues/942
tests/basic-types/arrays.vala | 4 ++--
tests/objects/bug778632.vala | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/basic-types/arrays.vala b/tests/basic-types/arrays.vala
index e87d8c909..d2b8c55f8 100644
--- a/tests/basic-types/arrays.vala
+++ b/tests/basic-types/arrays.vala
@@ -164,7 +164,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;
@@ -178,7 +178,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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]