D, Unit_Threaded, and GtkD

Cogitri oss at cogitri.dev
Sat May 16 11:37:32 UTC 2020


On Saturday, 16 May 2020 at 10:51:07 UTC, Russel Winder wrote:
>
> Has anyone got any D code using the Glib event loop, usually 
> GtkD code I'd guess, that is well tested using Unit_Threaded?

I always had a hard time doing unittests for things with as many 
moving parts as glib based software, so I usually just do 
integration tests like so: 
https://gitlab.alpinelinux.org/Cogitri/apk-polkit/-/blob/1dfbe2b3d959e3c083fcb82419a0a0401c485937/tests/apkd_dbus_server/addAndDelete.d

Maybe I should look into Unit_Threaded for more fine grained 
tests, but I think the effort for all the mocking stuff that I'd 
have to implement even for a (relatively) simple GDBus 
application would be quite substantial.


More information about the Digitalmars-d-learn mailing list