[vala/wip/issue/327: 41/41] Fix code style issues in tests
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/issue/327: 41/41] Fix code style issues in tests
- Date: Sun, 10 May 2020 16:41:02 +0000 (UTC)
commit 1dca61827de5c1057441a2bd3cd2587ccc03c41a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue May 5 10:27:06 2020 +0200
Fix code style issues in tests
tests/parser/with-invalid-declaration.test | 3 ++-
tests/parser/with-invalid-expression.test | 3 ++-
tests/parser/with-no-expression.test | 3 ++-
tests/semantic/with-array.test | 5 +++--
tests/semantic/with-class.test | 6 ++++--
tests/semantic/with-compact.vala | 6 +++---
tests/semantic/with-declaration-cast-type.vala | 9 ++++++---
tests/semantic/with-declaration-wrong-type.test | 9 ++++++---
tests/semantic/with-enum-member.vala | 5 +++--
tests/semantic/with-enum.test | 5 +++--
tests/semantic/with-error-member.test | 9 +++++----
tests/semantic/with-error.test | 7 ++++---
tests/semantic/with-namespace.test | 8 +++++---
tests/semantic/with-no-declaration.test | 6 ++++--
tests/semantic/with-no-such-member.test | 3 ++-
tests/semantic/with-pointer.test | 3 ++-
16 files changed, 56 insertions(+), 34 deletions(-)
---
diff --git a/tests/parser/with-invalid-declaration.test b/tests/parser/with-invalid-declaration.test
index ad9b8cfcc..ae1e775b2 100644
--- a/tests/parser/with-invalid-declaration.test
+++ b/tests/parser/with-invalid-declaration.test
@@ -1,5 +1,6 @@
Invalid Code
void main () {
- with (var f foo) { }
+ with (var f foo) {
+ }
}
diff --git a/tests/parser/with-invalid-expression.test b/tests/parser/with-invalid-expression.test
index 67bbcc60f..50fbe77e3 100644
--- a/tests/parser/with-invalid-expression.test
+++ b/tests/parser/with-invalid-expression.test
@@ -1,5 +1,6 @@
Invalid Code
void main () {
- with (f foo) { }
+ with (f foo) {
+ }
}
diff --git a/tests/parser/with-no-expression.test b/tests/parser/with-no-expression.test
index 561176989..0e01d28ab 100644
--- a/tests/parser/with-no-expression.test
+++ b/tests/parser/with-no-expression.test
@@ -1,5 +1,6 @@
Invalid Code
void main () {
- with () { }
+ with () {
+ }
}
diff --git a/tests/semantic/with-array.test b/tests/semantic/with-array.test
index 3b533ed37..bf0b4d18d 100644
--- a/tests/semantic/with-array.test
+++ b/tests/semantic/with-array.test
@@ -1,6 +1,7 @@
Invalid Code
void main () {
- int[] arr = {1, 2, 3};
- with (arr) { }
+ int[] arr = { 1, 2, 3 };
+ with (arr) {
+ }
}
diff --git a/tests/semantic/with-class.test b/tests/semantic/with-class.test
index aa580f5b6..2bea6e52c 100644
--- a/tests/semantic/with-class.test
+++ b/tests/semantic/with-class.test
@@ -1,7 +1,9 @@
Invalid Code
-class Foo { }
+class Foo {
+}
void main () {
- with (Foo) { }
+ with (Foo) {
+ }
}
diff --git a/tests/semantic/with-compact.vala b/tests/semantic/with-compact.vala
index 1b00b4b89..8600cb692 100644
--- a/tests/semantic/with-compact.vala
+++ b/tests/semantic/with-compact.vala
@@ -1,11 +1,11 @@
[Compact]
-class Cmpct {
+class Foo {
public int i;
}
void main () {
- var c = new Cmpct ();
- with (c) {
+ var foo = new Foo ();
+ with (foo) {
i = 13;
}
diff --git a/tests/semantic/with-declaration-cast-type.vala b/tests/semantic/with-declaration-cast-type.vala
index df5b583c1..c855d1c0b 100644
--- a/tests/semantic/with-declaration-cast-type.vala
+++ b/tests/semantic/with-declaration-cast-type.vala
@@ -1,7 +1,10 @@
-class Foo { }
+class Foo {
+}
-class Bar : Foo { }
+class Bar : Foo {
+}
void main () {
- with (Foo f = new Bar ()) { }
+ with (Foo f = new Bar ()) {
+ }
}
diff --git a/tests/semantic/with-declaration-wrong-type.test b/tests/semantic/with-declaration-wrong-type.test
index 1926cf56f..79ae8f8fb 100644
--- a/tests/semantic/with-declaration-wrong-type.test
+++ b/tests/semantic/with-declaration-wrong-type.test
@@ -1,9 +1,12 @@
Invalid Code
-class Foo { }
+class Foo {
+}
-class Bar { }
+class Bar {
+}
void main () {
- with (Bar f = new Foo ()) { }
+ with (Bar f = new Foo ()) {
+ }
}
diff --git a/tests/semantic/with-enum-member.vala b/tests/semantic/with-enum-member.vala
index 62e3e3cc4..3b5517db0 100644
--- a/tests/semantic/with-enum-member.vala
+++ b/tests/semantic/with-enum-member.vala
@@ -1,7 +1,8 @@
-enum Enumeration {
+enum FooEnum {
FIRST
}
void main () {
- with (Enumeration.FIRST) { }
+ with (FooEnum.FIRST) {
+ }
}
diff --git a/tests/semantic/with-enum.test b/tests/semantic/with-enum.test
index 93d6c9341..3a473a2f1 100644
--- a/tests/semantic/with-enum.test
+++ b/tests/semantic/with-enum.test
@@ -1,9 +1,10 @@
Invalid Code
-enum Enumeration {
+enum FooEnum {
FIRST
}
void main () {
- with (Enumeration) { }
+ with (FooEnum) {
+ }
}
diff --git a/tests/semantic/with-error-member.test b/tests/semantic/with-error-member.test
index b7d9ecc81..6d883b6e5 100644
--- a/tests/semantic/with-error-member.test
+++ b/tests/semantic/with-error-member.test
@@ -1,10 +1,11 @@
Invalid Code
-errordomain Err {
- Error
+errordomain FooError {
+ FAIL
}
void main () {
- var e = new Err.Error ("msg");
- with (e) { }
+ var e = new FooError.FAIL ("foo");
+ with (e) {
+ }
}
diff --git a/tests/semantic/with-error.test b/tests/semantic/with-error.test
index 7ca467ba2..61cc28efa 100644
--- a/tests/semantic/with-error.test
+++ b/tests/semantic/with-error.test
@@ -1,9 +1,10 @@
Invalid Code
-errordomain Err {
- ERROR
+errordomain FooError {
+ FAIL
}
void main () {
- with (Err) { }
+ with (FooError) {
+ }
}
diff --git a/tests/semantic/with-namespace.test b/tests/semantic/with-namespace.test
index f138adb52..e328fe205 100644
--- a/tests/semantic/with-namespace.test
+++ b/tests/semantic/with-namespace.test
@@ -1,7 +1,9 @@
-Invalid Code
+Invalid Code
-namespace Foo { }
+namespace Foo {
+}
void main () {
- with (Foo) { }
+ with (Foo) {
+ }
}
diff --git a/tests/semantic/with-no-declaration.test b/tests/semantic/with-no-declaration.test
index a1a3721a3..3b033a8e3 100644
--- a/tests/semantic/with-no-declaration.test
+++ b/tests/semantic/with-no-declaration.test
@@ -1,7 +1,9 @@
Invalid Code
-class Foo { }
+class Foo {
+}
void main () {
- with (f = new Foo ()) { }
+ with (f = new Foo ()) {
+ }
}
diff --git a/tests/semantic/with-no-such-member.test b/tests/semantic/with-no-such-member.test
index 5bf81cd4b..5f20d21c8 100644
--- a/tests/semantic/with-no-such-member.test
+++ b/tests/semantic/with-no-such-member.test
@@ -1,6 +1,7 @@
Invalid Code
-class Foo { }
+class Foo {
+}
void main () {
with (new Foo ()) {
diff --git a/tests/semantic/with-pointer.test b/tests/semantic/with-pointer.test
index 0e1f19e68..d268b1cd2 100644
--- a/tests/semantic/with-pointer.test
+++ b/tests/semantic/with-pointer.test
@@ -2,5 +2,6 @@ Invalid Code
void main () {
int i = 0;
- with (&i) { }
+ with (&i) {
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]