simplifying unit test
This commit is contained in:
parent
9f4c4dcf7f
commit
49f82eaf47
15
testing.cpp
15
testing.cpp
@ -213,15 +213,6 @@ static void testMap(Binding* binding, Protocol* protocol) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Control
|
|
||||||
//
|
|
||||||
|
|
||||||
void testComplete(bool* complete) {
|
|
||||||
*complete = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Program entry
|
// Program entry
|
||||||
//
|
//
|
||||||
@ -243,7 +234,6 @@ int main(int, char *[]) {
|
|||||||
|
|
||||||
Binding& binding = server.binding();
|
Binding& binding = server.binding();
|
||||||
Protocol& protocol = client.protocol();
|
Protocol& protocol = client.protocol();
|
||||||
bool complete = false;
|
|
||||||
|
|
||||||
#ifdef TEST_C_STRING
|
#ifdef TEST_C_STRING
|
||||||
testCString(&binding, &protocol);
|
testCString(&binding, &protocol);
|
||||||
@ -269,10 +259,7 @@ int main(int, char *[]) {
|
|||||||
testMap(&binding, &protocol);
|
testMap(&binding, &protocol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
binding.bind(FPARAM(testComplete));
|
while (protocol.pendingTasks()) {
|
||||||
protocol.invoke("testComplete", &complete);
|
|
||||||
|
|
||||||
while (!complete) {
|
|
||||||
server.advance();
|
server.advance();
|
||||||
client.advance();
|
client.advance();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user