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> 36 :
public CppUnit::TestFixture
125 if (!isxdigit(*aString))
return result; aString++;
126 if (!isxdigit(*aString))
return result; aString++;
127 if (!isxdigit(*aString))
return result; aString++;
128 if (!isxdigit(*aString))
return result; aString++;
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 (*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 (!isxdigit(*aString))
return result; aString++;
138 if (*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 (!isxdigit(*aString))
return result; aString++;
143 if (*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 (!isxdigit(*aString))
return result; aString++;
148 if (*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 (!isxdigit(*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++;
176 int main(
int argc,
char* argv[])
178 CppUnit::TextUi::TestRunner runner;
179 runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
180 CppUnit::Outputter* outputter =
181 new CppUnit::TextOutputter(&runner.result(), std::cout);
182 runner.setOutputter(outputter);
199 if (!isxdigit(*aString))
return result; aString++;
200 if (!isxdigit(*aString))
return result; aString++;
201 if (!isxdigit(*aString))
return result; aString++;
202 if (!isxdigit(*aString))
return result; aString++;
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 (*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 (!isxdigit(*aString))
return result; aString++;
212 if (*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 (!isxdigit(*aString))
return result; aString++;
217 if (*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 (!isxdigit(*aString))
return result; aString++;
222 if (*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 (!isxdigit(*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++;
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()