MCPcopy Create free account
hub / github.com/davisking/dlib / member_function_pointer_kernel_test

Function member_function_pointer_kernel_test

dlib/test/member_function_pointer.cpp:106–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 typename test_helper
105 >
106 void member_function_pointer_kernel_test (
107 )
108 /*!
109 requires
110 - mfp is an implementation of member_function_pointer/member_function_pointer_kernel_abstract.h
111 ensures
112 - runs tests on mfp for compliance with the specs
113 !*/
114 {
115
116
117 test_helper helper;
118
119 mfp<> a0, b0;
120 mfp<int> a1, b1;
121 mfp<int,int> a2, b2;
122 mfp<int,int,int> a3, b3;
123 mfp<int,int,int,int> a4, b4;
124
125 mfp<> a0c, b0c;
126 mfp<int> a1c, b1c;
127 mfp<int,int> a2c, b2c;
128 mfp<int,int,int> a3c, b3c;
129 mfp<int,int,int,int> a4c, b4c;
130
131 DLIB_TEST(a0c == b0c);
132 DLIB_TEST(a1c == b1c);
133 DLIB_TEST(a2c == b2c);
134 DLIB_TEST(a3c == b3c);
135 DLIB_TEST(a4c == b4c);
136 DLIB_TEST((a0c != b0c) == false);
137 DLIB_TEST((a1c != b1c) == false);
138 DLIB_TEST((a2c != b2c) == false);
139 DLIB_TEST((a3c != b3c) == false);
140 DLIB_TEST((a4c != b4c) == false);
141
142 DLIB_TEST(a0.is_set() == false);
143 DLIB_TEST(b0.is_set() == false);
144 DLIB_TEST(a0c.is_set() == false);
145 DLIB_TEST(b0c.is_set() == false);
146
147 DLIB_TEST(!a0 );
148 DLIB_TEST(!b0 );
149 DLIB_TEST(!a0c);
150 DLIB_TEST(!b0c);
151
152 DLIB_TEST(a1.is_set() == false);
153 DLIB_TEST(b1.is_set() == false);
154 DLIB_TEST(a1c.is_set() == false);
155 DLIB_TEST(b1c.is_set() == false);
156
157 DLIB_TEST(!a1 );
158 DLIB_TEST(!b1 );
159 DLIB_TEST(!a1c);
160 DLIB_TEST(!b1c);
161
162
163 DLIB_TEST(a2.is_set() == false);

Callers

nothing calls this directly

Calls 4

swapFunction · 0.70
is_setMethod · 0.45
setMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected