Added VS project for CPP Tests and fixed some CPP Tests bugs,
- Added a Visual Studio project for C++ test scripts. - Increased message buffer size in sendReadTest to account for assumptions made by sendUDP. - Fixed a bug in sendCTRLTest where not all DREF sizes were being set. - Fixed a bug in sendCTRLTest where not all DREFs were being requested. - All C++ tests are now passing on Windows for XP9, XP10-32 and XP10-64
This commit is contained in:
@@ -58,7 +58,7 @@ void sendReadTest() // send/read Test
|
||||
|
||||
// Initialization
|
||||
int i; // Iterator
|
||||
char test[] = {0, 1, 2, 3};
|
||||
char test[] = {0, 1, 2, 3, 5};
|
||||
char buf[5] = {0};
|
||||
struct xpcSocket sendPort, recvPort;
|
||||
|
||||
@@ -256,14 +256,14 @@ void sendCTRLTest() // sendCTRL test
|
||||
strcpy(DREFArray[3],"sim/flightmodel/engine/ENGN_thro");
|
||||
strcpy(DREFArray[4],"sim/cockpit/switches/gear_handle_status");
|
||||
strcpy(DREFArray[5],"sim/flightmodel/controls/flaprqsts");
|
||||
for (i=0;i<5;i++) {
|
||||
DREFSizes[i] = (int) strlen(DREFArray[i]);
|
||||
}
|
||||
for (i = 0; i < 100; i++) {
|
||||
DREFSizes[i] = (int)strlen(DREFArray[i]);
|
||||
}
|
||||
CTRL[3] = 0.8; // Throttle
|
||||
|
||||
// Execute
|
||||
sendCTRL(sendPort, 4, CTRL);
|
||||
result = requestDREF(sendPort, recvPort, DREFArray, DREFSizes, 1, recDATA, DREFSizes); // Test
|
||||
result = requestDREF(sendPort, recvPort, DREFArray, DREFSizes, 6, recDATA, DREFSizes); // Test
|
||||
|
||||
// Close
|
||||
closeUDP(sendPort);
|
||||
|
||||
Reference in New Issue
Block a user