tests: Add fp-device basic unit tests

Use the virtual image device as base for now, while the new setup allows
to create easily fake device drivers without including the driver in
libfprint itself and test all the fpi_device functionalities.
This commit is contained in:
Marco Trevisan (Treviño)
2019-12-05 17:05:21 +01:00
parent da46f53e82
commit b4c3756ab0
4 changed files with 314 additions and 0 deletions

View File

@@ -21,3 +21,17 @@
void fpt_setup_virtual_device_environment (void);
void fpt_teardown_virtual_device_environment (void);
typedef struct _FptContext
{
FpContext *fp_context;
FpDevice *device;
gpointer user_data;
} FptContext;
FptContext * fpt_context_new (void);
FptContext * fpt_context_new_with_virtual_imgdev (void);
void fpt_context_free (FptContext *test_context);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FptContext, fpt_context_free)