[vala/0.48] 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/0.48] tests: Don't use invalid syntax to declare local variable with array type
- Date: Wed, 15 Jul 2020 07:10:01 +0000 (UTC)
commit 35f5e664b14b43efe77faba0714a6c35d0f618e7
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 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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]