diff options
author | Alistair Thomas <astavale@yahoo.co.uk> | 2017-08-22 20:50:58 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2017-08-23 07:39:27 +0200 |
commit | c78d70fc5c3bc7740be209261d40513954acad1f (patch) | |
tree | a6811f51a25b0c7332fd7e5f6168a36f69cd311c | |
parent | a447cfa0a6f5ba8867c7501ad41ebed033d5b3ca (diff) | |
download | vala-c78d70fc5c3bc7740be209261d40513954acad1f.tar.gz |
tests: Fix test delegates/bug659778.vala
GObject type names must be atleast three characters long
(https://developer.gnome.org/gobject/stable/gtype-conventions.html).
The test for delegates/bug659778.vala uses an enum name of TE, which is
too short and when compiled produces the runtime errors:
GLib-GObject-WARNING **: type name 'TE' is too short
GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
and the test program does not terminate.
This has been hidden by the current test framework, testrunner.sh,
because that script adds a namespace around each test.
https://bugzilla.gnome.org/show_bug.cgi?id=786652
-rw-r--r-- | tests/delegates/bug659778.vala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/delegates/bug659778.vala b/tests/delegates/bug659778.vala index e73e3c1e4..79fa86eff 100644 --- a/tests/delegates/bug659778.vala +++ b/tests/delegates/bug659778.vala @@ -2,10 +2,10 @@ delegate G DoSomething<G>(G g); void do_something<G> (DoSomething<G> f) {} -enum TE { +enum TestEnum { T; public void f() { - do_something<TE> ((x) => { + do_something<TestEnum> ((x) => { switch (this) { case T: return T; @@ -15,7 +15,7 @@ enum TE { }); } public void g(int i) { - do_something<TE> ((x) => { + do_something<TestEnum> ((x) => { switch (this) { case T: i++; @@ -29,11 +29,11 @@ enum TE { class Test { public void f() { - do_something<TE> (g); + do_something<TestEnum> (g); do_something<int> (h); } [CCode (instance_pos = -1)] - private TE g(TE i) { + private TestEnum g(TestEnum i) { return i; } [CCode (instance_pos = -1)] @@ -43,7 +43,7 @@ class Test { } int main() { - TE t = TE.T; + TestEnum t = TestEnum.T; t.f (); t.g (0); Test t2 = new Test (); |