20 #include <cppunit/ui/text/TestRunner.h> 21 #include <cppunit/TextOutputter.h> 22 #include <cppunit/extensions/TestFactoryRegistry.h> 23 #include <cppunit/extensions/HelperMacros.h> 24 #include <cppunit/TestAssert.h> 26 #include <coil/UUID.h> 40 :
public CppUnit::TestFixture
129 if (!isxdigit(*aString))
return result; aString++;
130 if (!isxdigit(*aString))
return result; aString++;
131 if (!isxdigit(*aString))
return result; aString++;
132 if (!isxdigit(*aString))
return result; aString++;
133 if (!isxdigit(*aString))
return result; aString++;
134 if (!isxdigit(*aString))
return result; aString++;
135 if (!isxdigit(*aString))
return result; aString++;
136 if (!isxdigit(*aString))
return result; aString++;
137 if (*aString !=
'-')
return result; aString++;
138 if (!isxdigit(*aString))
return result; aString++;
139 if (!isxdigit(*aString))
return result; aString++;
140 if (!isxdigit(*aString))
return result; aString++;
141 if (!isxdigit(*aString))
return result; aString++;
142 if (*aString !=
'-')
return result; aString++;
143 if (!isxdigit(*aString))
return result; aString++;
144 if (!isxdigit(*aString))
return result; aString++;
145 if (!isxdigit(*aString))
return result; aString++;
146 if (!isxdigit(*aString))
return result; aString++;
147 if (*aString !=
'-')
return result; aString++;
148 if (!isxdigit(*aString))
return result; aString++;
149 if (!isxdigit(*aString))
return result; aString++;
150 if (!isxdigit(*aString))
return result; aString++;
151 if (!isxdigit(*aString))
return result; aString++;
152 if (*aString !=
'-')
return result; aString++;
153 if (!isxdigit(*aString))
return result; aString++;
154 if (!isxdigit(*aString))
return result; aString++;
155 if (!isxdigit(*aString))
return result; aString++;
156 if (!isxdigit(*aString))
return result; aString++;
157 if (!isxdigit(*aString))
return result; aString++;
158 if (!isxdigit(*aString))
return result; aString++;
159 if (!isxdigit(*aString))
return result; aString++;
160 if (!isxdigit(*aString))
return result; aString++;
161 if (!isxdigit(*aString))
return result; aString++;
162 if (!isxdigit(*aString))
return result; aString++;
163 if (!isxdigit(*aString))
return result; aString++;
164 if (!isxdigit(*aString))
return result; aString++;
180 int main(
int argc,
char* argv[])
182 CppUnit::TextUi::TestRunner runner;
183 runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
184 CppUnit::Outputter* outputter =
185 new CppUnit::TextOutputter(&runner.result(), std::cout);
186 runner.setOutputter(outputter);
203 if (!isxdigit(*aString))
return result; aString++;
204 if (!isxdigit(*aString))
return result; aString++;
205 if (!isxdigit(*aString))
return result; aString++;
206 if (!isxdigit(*aString))
return result; aString++;
207 if (!isxdigit(*aString))
return result; aString++;
208 if (!isxdigit(*aString))
return result; aString++;
209 if (!isxdigit(*aString))
return result; aString++;
210 if (!isxdigit(*aString))
return result; aString++;
211 if (*aString !=
'-')
return result; aString++;
212 if (!isxdigit(*aString))
return result; aString++;
213 if (!isxdigit(*aString))
return result; aString++;
214 if (!isxdigit(*aString))
return result; aString++;
215 if (!isxdigit(*aString))
return result; aString++;
216 if (*aString !=
'-')
return result; aString++;
217 if (!isxdigit(*aString))
return result; aString++;
218 if (!isxdigit(*aString))
return result; aString++;
219 if (!isxdigit(*aString))
return result; aString++;
220 if (!isxdigit(*aString))
return result; aString++;
221 if (*aString !=
'-')
return result; aString++;
222 if (!isxdigit(*aString))
return result; aString++;
223 if (!isxdigit(*aString))
return result; aString++;
224 if (!isxdigit(*aString))
return result; aString++;
225 if (!isxdigit(*aString))
return result; aString++;
226 if (*aString !=
'-')
return result; aString++;
227 if (!isxdigit(*aString))
return result; aString++;
228 if (!isxdigit(*aString))
return result; aString++;
229 if (!isxdigit(*aString))
return result; aString++;
230 if (!isxdigit(*aString))
return result; aString++;
231 if (!isxdigit(*aString))
return result; aString++;
232 if (!isxdigit(*aString))
return result; aString++;
233 if (!isxdigit(*aString))
return result; aString++;
234 if (!isxdigit(*aString))
return result; aString++;
235 if (!isxdigit(*aString))
return result; aString++;
236 if (!isxdigit(*aString))
return result; aString++;
237 if (!isxdigit(*aString))
return result; aString++;
238 if (!isxdigit(*aString))
return result; aString++;
int main(int argc, char **argv)
void test_UUID_to_string()
test UUID::to_string()
virtual void tearDown()
Test finalization.
CPPUNIT_TEST_SUITE(UUIDTests)
CPPUNIT_TEST(test_UUID_to_string)
void test_UUID_Generator_generateUUID()
coil::UUID * generateUUID(ACE_UINT16 version=0x0001, u_char variant=0x80)
coil::UUID_Generator * ug
bool isUuidString(const char *aString)
文字列がUUIDフォーマットかどうかを判別する。
virtual void setUp()
Test initialization.
const char * to_string()
Converting from UUID value to string.
CPPUNIT_TEST_SUITE_REGISTRATION(coilUUID::UUIDTests)
void test_UUID_Generator_init()
test UUID_Generator::init()