Updating unit tests
This commit is contained in:
parent
72912fba19
commit
6c8e2dfbb8
18
testing.cpp
18
testing.cpp
@ -84,7 +84,7 @@ static void testBasicStringAnsiImp(const std::string& string) {
|
||||
}
|
||||
|
||||
static void testBasicStringUnicodeImp(const std::wstring& string) {
|
||||
wprintf(L"[testBasicStringUnicodeImp]: '%S'\n", string.c_str());
|
||||
printf("[testBasicStringUnicodeImp]: '%S'\n", string.c_str());
|
||||
}
|
||||
|
||||
static void testBasicString(Binding* binding, Protocol* protocol) {
|
||||
@ -213,6 +213,15 @@ static void testMap(Binding* binding, Protocol* protocol) {
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Control
|
||||
//
|
||||
|
||||
void testComplete(bool* complete) {
|
||||
*complete = true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Program entry
|
||||
//
|
||||
@ -234,8 +243,8 @@ int main(int, char *[]) {
|
||||
|
||||
Binding& binding = server.binding();
|
||||
Protocol& protocol = client.protocol();
|
||||
bool complete = false;
|
||||
|
||||
do {
|
||||
#ifdef TEST_C_STRING
|
||||
testCString(&binding, &protocol);
|
||||
#endif
|
||||
@ -260,10 +269,13 @@ int main(int, char *[]) {
|
||||
testMap(&binding, &protocol);
|
||||
#endif
|
||||
|
||||
binding.bind(FPARAM(testComplete));
|
||||
protocol.invoke("testComplete", &complete);
|
||||
|
||||
while (!complete) {
|
||||
server.advance();
|
||||
client.advance();
|
||||
}
|
||||
while (server.clientCount() > 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user