<div dir="ltr"><div>Hello everyone,</div><div><br></div><div>I have been working on a C++ project that uses libmm-glib, but I recently ran into an issue around testing it. I was hoping to be able to create an artificial MMSim (not based on a real card) and pass that to my code under test. My main goal is to avoid dbus dependencies so I can directly instrument the 'external' data types in my tests. It seemed like it was going to be reasonably easy:</div><div><ol><li>Make a directory to hold my wrappers.</li><li>Create my own libmm-glib.h that imports the core enum and error header files.</li><li>Create my own GObject based MMSim class for instrumentation.</li><li>Do some clever stuff with include paths so my tests pull in my libmm-glib.h but my libmm-glib.h pulls in the ModemManager ModemManager-enums.h/etc files.</li></ol><div>But I realized I would lose access to all of libmm-glib's other types. I would have to reimplement types like MMBearerProperties (which is already a basic data type that needs no modification for testing).</div><div><br></div><div>Does anyone know a better way to do this? I have found details on Aleksander's blog about how to test ModemManager, but I have not yet come up with much on how to test code that uses ModemManager. Any advice would be greatly appreciated.</div><div><br></div><div>Thank you all for your time,<br></div><div>Jessy Diamond Exum<br></div></div></div>