-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcppcut-iterated-test.cpp
More file actions
92 lines (75 loc) · 2.75 KB
/
Copy pathcppcut-iterated-test.cpp
File metadata and controls
92 lines (75 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright (C) 2014 Kouhei Sutou <[email protected]>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "cppcut-iterated-test.h"
#include "cppcut-test-methods.h"
G_BEGIN_DECLS
G_DEFINE_TYPE(CppCutIteratedTest, cppcut_iterated_test, CUT_TYPE_ITERATED_TEST)
static void long_jump (CutTest *test,
jmp_buf *jump_buffer,
gint value);
static void invoke (CutTest *test,
CutTestContext *test_context,
CutRunContext *run_context);
static void
cppcut_iterated_test_class_init (CppCutIteratedTestClass *klass)
{
CutTestClass *cut_test_class;
cut_test_class = CUT_TEST_CLASS(klass);
cut_test_class->long_jump = long_jump;
cut_test_class->invoke = invoke;
}
static void
cppcut_iterated_test_init (CppCutIteratedTest *test)
{
}
CppCutIteratedTest *
cppcut_iterated_test_new (const gchar *name,
CutIteratedTestFunction function,
CutTestData *data)
{
gpointer object;
object = g_object_new(CPPCUT_TYPE_ITERATED_TEST,
"element-name", "iterated-test",
"name", name,
"iterated-test-function", function,
"data", data,
NULL);
return CPPCUT_ITERATED_TEST(object);
}
static void
long_jump (CutTest *test, jmp_buf *jump_buffer, gint value)
{
CutTestClass *cut_test_class;
cut_test_class = CUT_TEST_CLASS(cppcut_iterated_test_parent_class);
cut::test::long_jump(cut_test_class, test, jump_buffer, value);
}
static void
invoke (CutTest *test, CutTestContext *test_context, CutRunContext *run_context)
{
CutTestClass *cut_test_class;
cut_test_class = CUT_TEST_CLASS(cppcut_iterated_test_parent_class);
cut::test::invoke(cut_test_class, test, test_context, run_context);
}
G_END_DECLS
/*
vi:ts=4:nowrap:ai:expandtab:sw=4
*/