Ferada / cl-cffi-gtk

#cl-cffi-gtk on Freenode. A Lisp binding to GTK+3. SBCL/CCL/ABCL (ECL/CLISP unstable)
http://www.crategus.com/books/cl-cffi-gtk
41 stars 8 forks source link

Properly reference class types in tests #19

Open Ferada opened 6 years ago

Ferada commented 6 years ago

C.f. https://github.com/Ferada/cl-cffi-gtk/pull/18 - the tests can fail if the classes haven't been initialised - the proper way might be to have a fixture that calls g-type-class-ref and -unref around the tests which use e.g. GtkButton without creating an instance before looking at signals and so on, obviously that would be a bit more logic for not a lot of gain, but it would be strictly more safe than relying on the GC not removing that class too early (although some comments in GLib/GObject seem to indicate that the instantiated classes shouldn't disappear again, "static types").