From 8dace8b2ab287bafb0d67a4f7c430207d60b25cb Mon Sep 17 00:00:00 2001 From: Jason Watkins Date: Thu, 26 Mar 2015 09:15:41 -0700 Subject: [PATCH] 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 --- TestScripts/CPP Tests.win/CPPTests.sln | 19 +++++ TestScripts/CPP Tests.win/CPPTests.vcxproj | 75 +++++++++++++++++++ .../CPP Tests.win/CPPTests.vcxproj.filters | 25 +++++++ TestScripts/CPP Tests/main.cpp | 10 +-- 4 files changed, 124 insertions(+), 5 deletions(-) create mode 100644 TestScripts/CPP Tests.win/CPPTests.sln create mode 100644 TestScripts/CPP Tests.win/CPPTests.vcxproj create mode 100644 TestScripts/CPP Tests.win/CPPTests.vcxproj.filters diff --git a/TestScripts/CPP Tests.win/CPPTests.sln b/TestScripts/CPP Tests.win/CPPTests.sln new file mode 100644 index 0000000..ece566f --- /dev/null +++ b/TestScripts/CPP Tests.win/CPPTests.sln @@ -0,0 +1,19 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CPPTests", "CPPTests.vcxproj", "{9BA85F4F-A75A-4C27-BD85-2FEF881BEA13}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9BA85F4F-A75A-4C27-BD85-2FEF881BEA13}.Debug|Win32.ActiveCfg = Debug|Win32 + {9BA85F4F-A75A-4C27-BD85-2FEF881BEA13}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/TestScripts/CPP Tests.win/CPPTests.vcxproj b/TestScripts/CPP Tests.win/CPPTests.vcxproj new file mode 100644 index 0000000..b75ad82 --- /dev/null +++ b/TestScripts/CPP Tests.win/CPPTests.vcxproj @@ -0,0 +1,75 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {9BA85F4F-A75A-4C27-BD85-2FEF881BEA13} + CPPTests + + + + Application + true + v120 + MultiByte + + + Application + false + v120 + true + MultiByte + + + + + + + + + + + + + ../../C/src;$(IncludePath) + + + + Level3 + Disabled + false + + + true + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + true + + + + + + + + + + \ No newline at end of file diff --git a/TestScripts/CPP Tests.win/CPPTests.vcxproj.filters b/TestScripts/CPP Tests.win/CPPTests.vcxproj.filters new file mode 100644 index 0000000..7558937 --- /dev/null +++ b/TestScripts/CPP Tests.win/CPPTests.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/TestScripts/CPP Tests/main.cpp b/TestScripts/CPP Tests/main.cpp index 2447a8a..7054c27 100755 --- a/TestScripts/CPP Tests/main.cpp +++ b/TestScripts/CPP Tests/main.cpp @@ -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);