GNOME Bugzilla – Bug 786652
Fix test case delegates/bug659778.vala
Last modified: 2017-08-23 06:04:27 UTC
Created attachment 358181 [details] [review] Change identifier for enum to be greater than two characters 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. With this test, testrunner.sh, takes the original test code and creates a new Vala program called delegates.bug659778.vala. The script has added namespace delegates.bug659778 {} around the original code. This means TE is now longer than the three or more characters required. This is, however, a bad practise and has come to light in both the valadate branch and with someone attempting to use CMake for building Vala. This patch corrects the short name in the test so any future Vala test framework will not encounter a problem with this particular test.
Better use a camel-cased name for the enum as usual.
Created attachment 358182 [details] [review] Correct type name to GLib convention