tests/test-utils.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Unit tests for libfprint | ||
| 3 | * Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com> | ||
| 4 | * | ||
| 5 | * This library is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU Lesser General Public | ||
| 7 | * License as published by the Free Software Foundation; either | ||
| 8 | * version 2.1 of the License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This library is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * Lesser General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU Lesser General Public | ||
| 16 | * License along with this library; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <glib.h> | ||
| 21 | |||
| 22 | typedef enum { | ||
| 23 | FPT_VIRTUAL_DEVICE_IMAGE = 0, | ||
| 24 | FPT_VIRTUAL_DEVICE_NONIMAGE, | ||
| 25 | FPT_VIRTUAL_DEVICE_NONIMAGE_STORAGE, | ||
| 26 | FPT_NUM_VIRTUAL_DEVICE_TYPES | ||
| 27 | } FptVirtualDeviceType; | ||
| 28 | |||
| 29 | void fpt_setup_virtual_device_environment (FptVirtualDeviceType devtype); | ||
| 30 | void fpt_teardown_virtual_device_environment (void); | ||
| 31 | |||
| 32 | typedef struct _FptContext | ||
| 33 | { | ||
| 34 | FpContext *fp_context; | ||
| 35 | FpDevice *device; | ||
| 36 | gpointer user_data; | ||
| 37 | } FptContext; | ||
| 38 | |||
| 39 | FptContext * fpt_context_new (void); | ||
| 40 | FptContext * fpt_context_new_with_virtual_device (FptVirtualDeviceType devtype); | ||
| 41 | |||
| 42 | void fpt_context_free (FptContext *test_context); | ||
| 43 | |||
| 44 |
5/10✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 1 time.
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 1 time.
✓ Branch 14 → 15 taken 1 time.
✗ Branch 14 → 16 not taken.
✓ Branch 17 → 18 taken 2 times.
✗ Branch 17 → 19 not taken.
✓ Branch 18 → 19 taken 1 time.
✗ Branch 18 → 20 not taken.
|
22 | G_DEFINE_AUTOPTR_CLEANUP_FUNC (FptContext, fpt_context_free) |
| 45 |