Files
XPlaneConnectCSP/TestScripts/C Tests/main.c
Jason Watkins ec759cbbff Refactored C Tests
The C client tests were getting a bit unwieldy. Moved each block of tests to a separate file based on the functionality being tested. I've just put all of the test code directly in the headers because there doesn't seem to be any reason for the test headers to be included anywhere except in main.c.
2015-05-07 15:24:57 -07:00

59 lines
1.5 KiB
C

//Copyright (c) 2013-2015 United States Government as represented by the Administrator of the
//National Aeronautics and Space Administration. All Rights Reserved.
#include "Test.h"
#include "UDPTests.h"
#include "DrefTests.h"
#include "SimuTests.h"
#include "CtrlTests.h"
#include "PosiTests.h"
#include "DataTests.h"
#include "TextTests.h"
#include "WyptTests.h"
int main(int argc, const char * argv[])
{
printf("XPC Tests-c ");
#ifdef _WIN32
printf("(Windows)\n");
#elif (__APPLE__)
printf("(Mac) \n");
#elif (__linux)
printf("(Linux) \n");
#else
printf("(Unable to determine operating system) \n")
#endif
// Basic Networking
runTest(testOpen, "open");
runTest(testClose, "close");
// Datarefs
runTest(testGETD_Basic, "GETD");
runTest(testGETD_Types, "GETD (types)");
runTest(testGETD_TestFloat, "GETD (test float)");
runTest(testDREF, "DREF");
// Pause
runTest(testSIMU_Basic, "SIMU");
runTest(testSIMU_Toggle, "SIMU (toggle)");
// CTRL
runTest(testCTRL_Player, "CTRL (player)");
runTest(testCTRL_NonPlayer, "CTRL (non-player)");
runTest(testCTRL_Speedbrakes, "CTRL (speedbrakes)");
// POSI
runTest(testPOSI_Player, "POSI (player)");
runTest(testPOSI_NonPlayer, "POSI (non-player)");
// Data
runTest(testDATA, "DATA");
// Text
runTest(testTEXT, "TEXT");
// Waypoints
runTest(testWYPT, "WYPT");
// setConn
runTest(testCONN, "CONN");
printf( "----------------\nTest Summary\n\tFailed: %i\n\tPassed: %i\n", testFailed, testPassed );
return 0;
}