From 15791dcc540197ee26101ba6359cd42d07e2788a Mon Sep 17 00:00:00 2001 From: Ryan Lai Date: Tue, 11 Sep 2018 11:36:12 -0700 Subject: [PATCH] Added taef test project to build taef test dll --- Testing/WinMLRunnerTest/Filehelper.cpp | 25 +++ Testing/WinMLRunnerTest/Filehelper.h | 7 + Testing/WinMLRunnerTest/WinMLRunnerTest.cpp | Bin 0 -> 2084 bytes Testing/WinMLRunnerTest/WinMLRunnerTest.h | 15 ++ .../WinMLRunnerTest/WinMLRunnerTest.vcxproj | 169 ++++++++++++++++++ .../WinMLRunnerTest.vcxproj.filters | 33 ++++ Tools/WinMLRunner/WinMLRunner.sln | 10 ++ 7 files changed, 259 insertions(+) create mode 100644 Testing/WinMLRunnerTest/Filehelper.cpp create mode 100644 Testing/WinMLRunnerTest/Filehelper.h create mode 100644 Testing/WinMLRunnerTest/WinMLRunnerTest.cpp create mode 100644 Testing/WinMLRunnerTest/WinMLRunnerTest.h create mode 100644 Testing/WinMLRunnerTest/WinMLRunnerTest.vcxproj create mode 100644 Testing/WinMLRunnerTest/WinMLRunnerTest.vcxproj.filters diff --git a/Testing/WinMLRunnerTest/Filehelper.cpp b/Testing/WinMLRunnerTest/Filehelper.cpp new file mode 100644 index 00000000..969ab031 --- /dev/null +++ b/Testing/WinMLRunnerTest/Filehelper.cpp @@ -0,0 +1,25 @@ +#include "Filehelper.h" +#include +#include + +EXTERN_C IMAGE_DOS_HEADER __ImageBase; + +namespace FileHelper +{ + std::wstring GetModulePath() + { + std::wstring val; + wchar_t modulePath[MAX_PATH] = { 0 }; + GetModuleFileNameW((HINSTANCE)&__ImageBase, modulePath, _countof(modulePath)); + wchar_t drive[_MAX_DRIVE]; + wchar_t dir[_MAX_DIR]; + wchar_t filename[_MAX_FNAME]; + wchar_t ext[_MAX_EXT]; + errno_t err = _wsplitpath_s(modulePath, drive, _MAX_DRIVE, dir, _MAX_DIR, filename, _MAX_FNAME, ext, _MAX_EXT); + + val = drive; + val += dir; + + return val; + } +} \ No newline at end of file diff --git a/Testing/WinMLRunnerTest/Filehelper.h b/Testing/WinMLRunnerTest/Filehelper.h new file mode 100644 index 00000000..8d92afde --- /dev/null +++ b/Testing/WinMLRunnerTest/Filehelper.h @@ -0,0 +1,7 @@ +#pragma once +#include +#include +namespace FileHelper +{ + std::wstring GetModulePath(); +} \ No newline at end of file diff --git a/Testing/WinMLRunnerTest/WinMLRunnerTest.cpp b/Testing/WinMLRunnerTest/WinMLRunnerTest.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31ac0a8b2523db8d974b7b5b9ac3697193d4e6bb GIT binary patch literal 2084 zcmb7_TW=Ck6ovP*iT?pHX{egoXKzWRgRKEUpjMxnDPUVep@FG2HvDzriGhEu{ zWF~Ot?6uck`*QyNd1@CnvYrj?+WI!IlD)BG-|O4hZft5hc5d(Nu|2X?XRmC+xgM5N zR>Ii{zhkhbystpoWM58wHLPxJ7>rm05W0?+xNUi@?;Gbi!s{jgVAq3l0@9p^;!w6?-|rF0KD?XcV4vS16Rk9}6>`(!Ylp0~`PxgPiixVv zH!&R8w#Rqt?-Hl9WU+@$*N#9qv`?tp^!-ELZ+UKcc6ny0KAB|;t0wwIV07%{zirzZ zAa?oR1g+$#n~@gds;0G>X;CA?F&a-n5}Vxuiw=Hvi1#%8uDt&y*0FuJ3cL=9I%Fo} z{RPHt_G|XdS&O?=J7T|*(!yF;(l1gjU|tne3IroIPufJW+9sWM0HF3js<#CO@|nHH^e3nWzL z1h1tfra`fpcZ6oqPgq{SPSaD_TX!F5s%EoI{&hB?N_5wpd1R~RQ0((>47xgF + +class WinMLRunnerTest +{ +public: + TEST_CLASS(WinMLRunnerTest); + TEST_METHOD(TestPrintUsage); + //TEST_METHOD(GarbageInputCpuAndGpu); + //TEST_METHOD(GarbageInputOnlyCpu); + //TEST_METHOD(GarbageInputOnlyCPU); + //TEST_METHOD(ProvidedInputCpuAndGpu); + //TEST_METHOD(ProvidedInputOnlyCpu); + //TEST_METHOD(ProvidedInputOnlyCPU); +}; \ No newline at end of file diff --git a/Testing/WinMLRunnerTest/WinMLRunnerTest.vcxproj b/Testing/WinMLRunnerTest/WinMLRunnerTest.vcxproj new file mode 100644 index 00000000..ed314037 --- /dev/null +++ b/Testing/WinMLRunnerTest/WinMLRunnerTest.vcxproj @@ -0,0 +1,169 @@ + + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {FF0098C4-A953-439C-BAE1-13587192D481} + Win32Proj + WinMLRunnerTest + 10.0.17713.0 + + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + NotUsing + Level3 + Disabled + true + _DEBUG;WINMLRUNNERTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Use + Level3 + Disabled + true + WIN32;_DEBUG;WINMLRUNNERTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Use + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;WINMLRUNNERTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Use + Level3 + MaxSpeed + true + true + true + NDEBUG;WINMLRUNNERTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/Testing/WinMLRunnerTest/WinMLRunnerTest.vcxproj.filters b/Testing/WinMLRunnerTest/WinMLRunnerTest.vcxproj.filters new file mode 100644 index 00000000..f1ac6722 --- /dev/null +++ b/Testing/WinMLRunnerTest/WinMLRunnerTest.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {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;ipp;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 + + + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/Tools/WinMLRunner/WinMLRunner.sln b/Tools/WinMLRunner/WinMLRunner.sln index 703efe20..dd9e3882 100644 --- a/Tools/WinMLRunner/WinMLRunner.sln +++ b/Tools/WinMLRunner/WinMLRunner.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.27004.2005 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinMLRunner", "WinMLRunner.vcxproj", "{81EA9CC6-8A26-4583-B1A4-84740EF815C8}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinMLRunnerTest", "..\..\Testing\WinMLRunnerTest\WinMLRunnerTest.vcxproj", "{FF0098C4-A953-439C-BAE1-13587192D481}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -21,6 +23,14 @@ Global {81EA9CC6-8A26-4583-B1A4-84740EF815C8}.Release|x64.Build.0 = Release|x64 {81EA9CC6-8A26-4583-B1A4-84740EF815C8}.Release|x86.ActiveCfg = Release|Win32 {81EA9CC6-8A26-4583-B1A4-84740EF815C8}.Release|x86.Build.0 = Release|Win32 + {FF0098C4-A953-439C-BAE1-13587192D481}.Debug|x64.ActiveCfg = Debug|x64 + {FF0098C4-A953-439C-BAE1-13587192D481}.Debug|x64.Build.0 = Debug|x64 + {FF0098C4-A953-439C-BAE1-13587192D481}.Debug|x86.ActiveCfg = Debug|Win32 + {FF0098C4-A953-439C-BAE1-13587192D481}.Debug|x86.Build.0 = Debug|Win32 + {FF0098C4-A953-439C-BAE1-13587192D481}.Release|x64.ActiveCfg = Release|x64 + {FF0098C4-A953-439C-BAE1-13587192D481}.Release|x64.Build.0 = Release|x64 + {FF0098C4-A953-439C-BAE1-13587192D481}.Release|x86.ActiveCfg = Release|Win32 + {FF0098C4-A953-439C-BAE1-13587192D481}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE