2
* @file geis_backend_test_fixture.c
3
* @brief GEIS mock back end test fixture implementation
5
* Copyright 2010 Canonical Ltd.
7
* This library is free software; you can redistribute it and/or modify it under
8
* the terms of the GNU Lesser General Public License as published by the Free
9
* Software Foundation; either version 3 of the License, or (at your option) any
12
* This library is distributed in the hope that it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17
* You should have received a copy of the GNU Lesser General Public License
18
* along with this program; if not, write to the Free Software Foundation, Inc.,
19
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#include "geis_backend.h"
22
#include "geis_backend_protected.h"
24
#include "geis_logging.h"
28
typedef struct _GeisBackendTestFixture
30
struct _GeisBackend tf_base;
31
} *GeisBackendTestFixture;
35
geis_backend_finalize(GeisBackend be)
37
GeisBackendTestFixture tf __attribute__((unused)) = (GeisBackendTestFixture)be;
41
static struct _GeisBackendVtable tf_vtbl = {
46
geis_backend_new_test_fixture(Geis geis __attribute__((unused)))
48
GeisBackendTestFixture tf = calloc(1, sizeof(struct _GeisBackendTestFixture));
51
geis_error("failed to allocate GEIS back end test fixture");
55
geis_backend_init_base(&tf->tf_base, &tf_vtbl, "GEIS2 test fixture");
57
geis_debug("%s back end created", geis_backend_name(&tf->tf_base));
60
return (GeisBackend)tf;