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) {
|
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) {
|
static void testBasicString(Binding* binding, Protocol* protocol) {
|
||||||
@ -213,6 +213,15 @@ static void testMap(Binding* binding, Protocol* protocol) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Control
|
||||||
|
//
|
||||||
|
|
||||||
|
void testComplete(bool* complete) {
|
||||||
|
*complete = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Program entry
|
// Program entry
|
||||||
//
|
//
|
||||||
@ -234,8 +243,8 @@ int main(int, char *[]) {
|
|||||||
|
|
||||||
Binding& binding = server.binding();
|
Binding& binding = server.binding();
|
||||||
Protocol& protocol = client.protocol();
|
Protocol& protocol = client.protocol();
|
||||||
|
bool complete = false;
|
||||||
|
|
||||||
do {
|
|
||||||
#ifdef TEST_C_STRING
|
#ifdef TEST_C_STRING
|
||||||
testCString(&binding, &protocol);
|
testCString(&binding, &protocol);
|
||||||
#endif
|
#endif
|
||||||
@ -260,10 +269,13 @@ int main(int, char *[]) {
|
|||||||
testMap(&binding, &protocol);
|
testMap(&binding, &protocol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
binding.bind(FPARAM(testComplete));
|
||||||
|
protocol.invoke("testComplete", &complete);
|
||||||
|
|
||||||
|
while (!complete) {
|
||||||
server.advance();
|
server.advance();
|
||||||
client.advance();
|
client.advance();
|
||||||
}
|
}
|
||||||
while (server.clientCount() > 0);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user