summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-03-27 12:46:26 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-03-27 13:12:02 +0200
commit55d883a5b593be366aff440ead4571ee76d86d02 (patch)
treebe85465984a784b0e553a1c15f6e9c91b257be3c /tests
parent7bd54c7a88555831febf186295cc44a7301aa83f (diff)
downloadvala-55d883a5b593be366aff440ead4571ee76d86d02.tar.gz
Drop trailing spaces/tabs
It was about time to do this.
Diffstat (limited to 'tests')
-rw-r--r--tests/basic-types/bug571486.vala6
-rw-r--r--tests/basic-types/bug731017.vala4
-rw-r--r--tests/control-flow/break.vala6
-rw-r--r--tests/control-flow/bug691514.vala10
-rw-r--r--tests/control-flow/switch.vala14
-rw-r--r--tests/delegates/delegates.vala4
-rw-r--r--tests/enums/enums.vala4
-rw-r--r--tests/errors/errors.vala2
-rw-r--r--tests/methods/bug652098.vala4
-rw-r--r--tests/methods/generics.vala2
-rw-r--r--tests/methods/iterator.vala4
-rw-r--r--tests/methods/lambda.vala2
-rw-r--r--tests/objects/bug631267.vala6
-rw-r--r--tests/objects/bug751338.vala6
-rw-r--r--tests/objects/bug779955.vala2
-rw-r--r--tests/objects/fields.vala18
-rw-r--r--tests/objects/interfaces.vala2
-rw-r--r--tests/objects/methods.vala6
-rw-r--r--tests/objects/properties.vala6
-rw-r--r--tests/objects/signals.vala14
-rw-r--r--tests/objects/test-025.vala2
-rw-r--r--tests/objects/test-026.vala2
-rw-r--r--tests/objects/test-029.vala12
23 files changed, 69 insertions, 69 deletions
diff --git a/tests/basic-types/bug571486.vala b/tests/basic-types/bug571486.vala
index 4ba922ec2..1240bc515 100644
--- a/tests/basic-types/bug571486.vala
+++ b/tests/basic-types/bug571486.vala
@@ -13,14 +13,14 @@ class Foo {
void main () {
Object o1 = new Object ();
Object o2 = new Object ();
-
+
(unowned Object)[] test = new (unowned Object)[] { o1 };
assert (o1.ref_count == 1);
test[0] = o2;
assert (o1.ref_count == 1);
assert (o2.ref_count == 1);
-
- test = null;
+
+ test = null;
assert (o1.ref_count == 1);
assert (o2.ref_count == 1);
diff --git a/tests/basic-types/bug731017.vala b/tests/basic-types/bug731017.vala
index 4f25205a7..2359b4807 100644
--- a/tests/basic-types/bug731017.vala
+++ b/tests/basic-types/bug731017.vala
@@ -8,10 +8,10 @@ string foo = null;
void main() {
foo = "foo";
-
+
string[] keys = bar();
foo = null;
-
+
foreach (unowned string k in keys) {
assert (k == "foo");
}
diff --git a/tests/control-flow/break.vala b/tests/control-flow/break.vala
index 9eb35d0a0..8505959ad 100644
--- a/tests/control-flow/break.vala
+++ b/tests/control-flow/break.vala
@@ -3,15 +3,15 @@ using GLib;
class Maman.Bar : Object {
public static int main () {
stdout.printf ("Break Test: 1");
-
+
int i;
for (i = 0; i < 10; i++) {
stdout.printf (" 2");
break;
}
-
+
stdout.printf (" 3\n");
-
+
return 0;
}
}
diff --git a/tests/control-flow/bug691514.vala b/tests/control-flow/bug691514.vala
index 661e73c04..4f60c7702 100644
--- a/tests/control-flow/bug691514.vala
+++ b/tests/control-flow/bug691514.vala
@@ -5,19 +5,19 @@ public string[] test() throws Error {
void main() {
string t = (true ? "1" : "2") ?? "3";
assert (t == "1");
-
+
t = (false ? "1" : "2") ?? "3";
assert (t == "2");
-
+
t = (true ? null : "2") ?? "3";
assert (t == "3");
-
+
t = (false ? "1" : null) ?? "3";
assert (t == "3");
-
+
t = test()[0] ?? "2";
assert (t == "2");
-
+
t = test()[1] ?? "2";
assert (t == "1");
}
diff --git a/tests/control-flow/switch.vala b/tests/control-flow/switch.vala
index 9ea363fd1..5a1bb24af 100644
--- a/tests/control-flow/switch.vala
+++ b/tests/control-flow/switch.vala
@@ -18,7 +18,7 @@ class Maman.Bar : Object {
for (i = 2; i < 7; i++) {
stdout.printf (" %d", i);
}
-
+
stdout.printf (" 7\n");
stdout.printf ("Switch statement: 1");
@@ -37,7 +37,7 @@ class Maman.Bar : Object {
class Maman.Foo : Object {
public void run () {
stdout.printf (" 2");
-
+
switch (23) {
case 23:
stdout.printf (" 3");
@@ -46,7 +46,7 @@ class Maman.Foo : Object {
stdout.printf (" BAD");
break;
}
-
+
switch (inc ()) {
case 0:
stdout.printf (" 4");
@@ -58,7 +58,7 @@ class Maman.Foo : Object {
stdout.printf (" BAD");
break;
}
-
+
switch (42) {
case 0:
stdout.printf (" BAD");
@@ -70,14 +70,14 @@ class Maman.Foo : Object {
stdout.printf (" BAD");
break;
}
-
+
stdout.printf (" 6");
}
-
+
public int inc () {
return counter++;
}
-
+
private int counter = 0;
}
diff --git a/tests/delegates/delegates.vala b/tests/delegates/delegates.vala
index 34bf1fcb7..03fb9b17f 100644
--- a/tests/delegates/delegates.vala
+++ b/tests/delegates/delegates.vala
@@ -80,7 +80,7 @@ class Maman.Bar : Object, Foo {
public static int main () {
stdout.printf ("Delegate Test: 1");
-
+
VoidCallback void_cb = do_void_action;
void_cb ();
@@ -88,7 +88,7 @@ class Maman.Bar : Object, Foo {
stdout.printf (" 3");
ActionCallback cb = do_action;
-
+
stdout.printf (" %d", cb ());
stdout.printf (" 5");
diff --git a/tests/enums/enums.vala b/tests/enums/enums.vala
index c9f913f07..87bb127d0 100644
--- a/tests/enums/enums.vala
+++ b/tests/enums/enums.vala
@@ -24,7 +24,7 @@ class Maman.Bar : Object {
stdout.printf (" %d", Foo.VAL3);
stdout.printf (" 4");
-
+
stdout.printf (" %d", Foo.VAL5);
}
@@ -40,7 +40,7 @@ class Maman.Bar : Object {
public static int main () {
stdout.printf ("Enum Test: 1");
-
+
var bar = new Bar ();
bar.run ();
diff --git a/tests/errors/errors.vala b/tests/errors/errors.vala
index 264e6376d..27f42f974 100644
--- a/tests/errors/errors.vala
+++ b/tests/errors/errors.vala
@@ -75,7 +75,7 @@ class Maman.Bar : Object {
public static int main () {
stdout.printf ("Exception Test: 1");
-
+
var bar = new Bar ();
bar.run ();
diff --git a/tests/methods/bug652098.vala b/tests/methods/bug652098.vala
index d16f27f5d..3cb19cab7 100644
--- a/tests/methods/bug652098.vala
+++ b/tests/methods/bug652098.vala
@@ -42,14 +42,14 @@ void main () {
var obj1 = new Obj1 ();
var iface1 = (Iface1) obj1;
var iface2 = (Iface2) obj1;
-
+
assert (iface1.foo () == 1);
assert (iface2.foo () == 2);
var obj2 = new Obj2 ();
iface1 = (Iface1) obj2;
iface2 = (Iface2) obj2;
-
+
assert (iface1.foo () == 1);
assert (iface2.foo () == 2);
} \ No newline at end of file
diff --git a/tests/methods/generics.vala b/tests/methods/generics.vala
index 27e9cc16e..9b37aeeab 100644
--- a/tests/methods/generics.vala
+++ b/tests/methods/generics.vala
@@ -27,7 +27,7 @@ void main () {
var baz = new Baz ();
baz.foo<Object> (bar);
assert (baz.ref_count == 1);
-
+
assert (is_check<Bar> ());
assert (!is_check<Baz> ());
}
diff --git a/tests/methods/iterator.vala b/tests/methods/iterator.vala
index 68d573e35..d2ee2dcc6 100644
--- a/tests/methods/iterator.vala
+++ b/tests/methods/iterator.vala
@@ -3,7 +3,7 @@ class Foo {
class FooIterator {
bool called = false;
-
+
public bool next () {
return !called;
}
@@ -23,7 +23,7 @@ class FooCollection {
class FooIterator2 {
bool called = false;
-
+
public Foo? next_value () {
if (called)
return null;
diff --git a/tests/methods/lambda.vala b/tests/methods/lambda.vala
index c659cb65b..00afd9faa 100644
--- a/tests/methods/lambda.vala
+++ b/tests/methods/lambda.vala
@@ -26,7 +26,7 @@ class Maman.Bar : Object {
assert (do_action (i => { return i * 3; }) == 3);
assert (do_out_action ((out i) => { i = 4; }) == 4);
assert (do_ref_action ((ref i) => { i += 4; }) == 5);
-
+
return 0;
}
}
diff --git a/tests/objects/bug631267.vala b/tests/objects/bug631267.vala
index c9576c2cc..296fca86c 100644
--- a/tests/objects/bug631267.vala
+++ b/tests/objects/bug631267.vala
@@ -12,7 +12,7 @@ class Foo : Object {
public FObject o { get; set; }
public FStruct t { get; set; }
public void* p { get; set; }
-
+
public int foo { get { return i; } }
public int bar { set { i = value; } }
@@ -27,7 +27,7 @@ void main () {
var o = new FObject ();
FStruct t = {};
void* p = &o;
-
+
var foo = new Foo ();
foo.s = s;
foo.a = a;
@@ -35,7 +35,7 @@ void main () {
foo.o = o;
foo.t = t;
foo.p = p;
-
+
foo.notify["s"].connect (() => error ("string-type equality failed"));
foo.notify["a"].connect (() => error ("array-type equality failed"));
foo.notify["i"].connect (() => error ("simple-type equality failed"));
diff --git a/tests/objects/bug751338.vala b/tests/objects/bug751338.vala
index 04bacac00..353071e9d 100644
--- a/tests/objects/bug751338.vala
+++ b/tests/objects/bug751338.vala
@@ -10,16 +10,16 @@ public class Foo : Object {
void main() {
string[]? strings;
var f = new Foo();
-
+
f.set("strings", new string[]{ "foo", "bar" });
f.get("strings", out strings);
assert (strings[0] == "foo");
assert (strings[1] == "bar");
-
+
f.set("strings", null);
f.get("strings", out strings);
assert(strings == null);
-
+
f.set("strings", new string[]{ "foo", "bar" });
f.get("strings", out strings);
assert (strings[0] == "foo");
diff --git a/tests/objects/bug779955.vala b/tests/objects/bug779955.vala
index e67ef0ca8..d1ecc3f2d 100644
--- a/tests/objects/bug779955.vala
+++ b/tests/objects/bug779955.vala
@@ -1,6 +1,6 @@
public class Foo : Object {
int i = 42;
-
+
public int bar {
get {
return i;
diff --git a/tests/objects/fields.vala b/tests/objects/fields.vala
index 96b66783e..8229e978e 100644
--- a/tests/objects/fields.vala
+++ b/tests/objects/fields.vala
@@ -15,7 +15,7 @@ class Maman.Bar : Foo {
private int private_field = 4;
private static int private_static_field = 5;
public static int public_static_field = 6;
- private class int private_class_field;
+ private class int private_class_field;
public class int public_class_field;
class construct {
@@ -24,10 +24,10 @@ class Maman.Bar : Foo {
static construct {
public_class_field = 8;
}
-
+
void do_action () {
stdout.printf (" %d %d %d %d %d %d %d", public_base_field, public_field,
- private_field, private_static_field, public_static_field,
+ private_field, private_static_field, public_static_field,
private_class_field, public_class_field);
public_base_field = 9;
public_field = 10;
@@ -45,12 +45,12 @@ class Maman.Bar : Foo {
public_class_field = 15;
}
stdout.printf (" %d %d %d %d %d %d %d", public_base_field, public_field,
- private_field, private_static_field, public_static_field,
+ private_field, private_static_field, public_static_field,
private_class_field, public_class_field);
}
class void do_action_class () {
- stdout.printf (" %d %d %d %d", private_static_field, public_static_field,
+ stdout.printf (" %d %d %d %d", private_static_field, public_static_field,
private_class_field, public_class_field);
lock (private_static_field) {
private_static_field = 12;
@@ -64,13 +64,13 @@ class Maman.Bar : Foo {
lock (public_class_field) {
public_class_field = 15;
}
- stdout.printf (" %d %d %d %d", private_static_field, public_static_field,
+ stdout.printf (" %d %d %d %d", private_static_field, public_static_field,
private_class_field, public_class_field);
}
public static int main () {
stdout.printf ("Field Test: 1");
-
+
var bar = new Bar ();
bar.do_action ();
bar.do_action_class ();
@@ -83,12 +83,12 @@ class Maman.Bar : Foo {
bar.private_class_field = 21;
((Foo)bar).public_class_field = 22;
stdout.printf (" %d %d %d %d %d %d %d", bar.public_base_field, bar.public_field,
- bar.private_field, bar.private_static_field, bar.public_static_field,
+ bar.private_field, bar.private_static_field, bar.public_static_field,
bar.private_class_field, ((Foo)bar).public_class_field);
var foo = new Foo ();
stdout.printf (" %d", foo.public_class_field);
-
+
var compact = new CompactTest ();
stdout.printf (" %d", compact.initialized_field);
diff --git a/tests/objects/interfaces.vala b/tests/objects/interfaces.vala
index e6895d68b..be4119d51 100644
--- a/tests/objects/interfaces.vala
+++ b/tests/objects/interfaces.vala
@@ -47,7 +47,7 @@ class Maman.SubBaz : Baz {
ibaz.do_action ();
ibaz.public_mixin();
(ibaz as Baz).do_mixin();
-
+
stdout.printf (" 3");
ibaz.do_virtual_action ();
diff --git a/tests/objects/methods.vala b/tests/objects/methods.vala
index 7217474ca..9a950c322 100644
--- a/tests/objects/methods.vala
+++ b/tests/objects/methods.vala
@@ -32,7 +32,7 @@ class Maman.SubBar : Bar {
var bar = new SubBar ();
bar.do_action ();
-
+
stdout.printf (" 3\n");
stdout.printf ("Static Inheritance Test: 1");
@@ -44,7 +44,7 @@ class Maman.SubBar : Bar {
stdout.printf ("Virtual Method Test: 1");
bar.do_virtual_action ();
-
+
stdout.printf (" 3\n");
// test symbol resolving to check that methods of implemented
@@ -53,7 +53,7 @@ class Maman.SubBar : Bar {
var foobar = new SubFooBar ();
foobar.do_action ();
-
+
stdout.printf (" 3\n");
test_classes_methods_ref_parameters ();
diff --git a/tests/objects/properties.vala b/tests/objects/properties.vala
index 1a40e95e0..3d86de106 100644
--- a/tests/objects/properties.vala
+++ b/tests/objects/properties.vala
@@ -69,7 +69,7 @@ public class Sample : Object {
Maman.Ibaz ibaz = new Maman.Baz ();
ibaz.simple_method ();
-
+
stdout.printf (" 3\n");
var nonpriv = new NonPrivAccess ();
@@ -114,10 +114,10 @@ class Maman.Bar : Foo {
public static void run () {
stdout.printf ("Property Test: 1");
-
+
var bar = new Bar ();
bar.do_action ();
-
+
Foo foo = bar;
foo.abstract_base_property = 6;
stdout.printf (" %d", foo.abstract_base_property);
diff --git a/tests/objects/signals.vala b/tests/objects/signals.vala
index 195f563c8..3e9764d94 100644
--- a/tests/objects/signals.vala
+++ b/tests/objects/signals.vala
@@ -19,9 +19,9 @@ class Maman.Bar : Object {
public void run () {
stdout.printf (" 2");
-
+
var foo = new Foo ();
-
+
foo.activated.connect ((foo, b) => {
if (b) {
stdout.printf (" 8");
@@ -33,11 +33,11 @@ class Maman.Bar : Object {
foo.activated.connect (activated);
stdout.printf (" 3");
-
+
foo.do_action (false);
stdout.printf (" 6");
-
+
foo.activated.disconnect (activated);
stdout.printf (" 7");
@@ -59,15 +59,15 @@ class Maman.UserFoo : Object {
class Maman.UserBar : Object {
public void run () {
stdout.printf (" 2");
-
+
var foo = new UserFoo ();
-
+
foo.activated.connect ((foo, i1, i2) => {
stdout.printf (" %d", i1 + i2);
});
stdout.printf (" 3");
-
+
foo.do_action ();
stdout.printf (" 5");
diff --git a/tests/objects/test-025.vala b/tests/objects/test-025.vala
index 8ffda92cf..af052e277 100644
--- a/tests/objects/test-025.vala
+++ b/tests/objects/test-025.vala
@@ -24,7 +24,7 @@ class Maman.SubBar : Bar {
var bar = new SubBar ();
bar.run ();
-
+
stdout.printf (" 5\n");
return 0;
diff --git a/tests/objects/test-026.vala b/tests/objects/test-026.vala
index 154efadb1..7d4197212 100644
--- a/tests/objects/test-026.vala
+++ b/tests/objects/test-026.vala
@@ -24,7 +24,7 @@ class Maman.SubBar : Bar {
var bar = new SubBar ();
bar.run ();
-
+
stdout.printf (" 5\n");
return 0;
diff --git a/tests/objects/test-029.vala b/tests/objects/test-029.vala
index acc7ec1d7..e923eafd4 100644
--- a/tests/objects/test-029.vala
+++ b/tests/objects/test-029.vala
@@ -3,23 +3,23 @@ using GLib;
class Maman.Foo : Object {
public int p1 { get; set; }
public int p2 { get; set; }
-
+
public Foo (int i, int p2) {
p1 = 2 * i;
this.p2 = p2;
}
-
+
public static int main () {
stdout.printf ("Construct Formal Parameter Test: 1");
-
+
var foo = new Foo (2, 3);
-
+
stdout.printf (" 2");
stdout.printf (" %d", foo.p2);
stdout.printf (" %d", foo.p1);
-
+
stdout.printf (" 5\n");
-
+
return 0;
}
}