aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--StormLib_test.vcproj2
-rw-r--r--src/StormPort.h5
-rw-r--r--test/StormTest.cppbin347258 -> 346910 bytes
-rw-r--r--test/TLogHelper.cpp11
5 files changed, 17 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3055577..f5211b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -359,7 +359,9 @@ install(TARGETS ${LIBRARY_NAME}
INCLUDE(CPack)
if(STORM_BUILD_TESTS)
- add_executable(storm_test ${TEST_SRC_FILES})
target_link_libraries(storm_test ${LIBRARY_NAME})
install(TARGETS storm_test DESTINATION bin)
endif()
+
+add_executable(storm_test ${SRC_FILES} ${TOMCRYPT_FILES} ${TOMMATH_FILES} ${ZLIB_BZIP2_FILES} ${TEST_SRC_FILES})
+install(TARGETS storm_test RUNTIME DESTINATION bin)
diff --git a/StormLib_test.vcproj b/StormLib_test.vcproj
index 61561d5..0ef7c5e 100644
--- a/StormLib_test.vcproj
+++ b/StormLib_test.vcproj
@@ -259,7 +259,7 @@
OutputDirectory="./bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"
IntermediateDirectory="./bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
diff --git a/src/StormPort.h b/src/StormPort.h
index 25134b9..93d7139 100644
--- a/src/StormPort.h
+++ b/src/StormPort.h
@@ -158,6 +158,10 @@
#define MAX_PATH 1024
#endif
+ #ifndef _countof
+ #define _countof(x) (sizeof(x) / sizeof(x[0]))
+ #endif
+
#define WINAPI
#define FILE_BEGIN SEEK_SET
@@ -175,6 +179,7 @@
#define _tprintf printf
#define _stprintf sprintf
#define _tremove remove
+ #define _tmain main
#define _stricmp strcasecmp
#define _strnicmp strncasecmp
diff --git a/test/StormTest.cpp b/test/StormTest.cpp
index 4763d77..cb7c8b0 100644
--- a/test/StormTest.cpp
+++ b/test/StormTest.cpp
Binary files differ
diff --git a/test/TLogHelper.cpp b/test/TLogHelper.cpp
index 6565578..a554573 100644
--- a/test/TLogHelper.cpp
+++ b/test/TLogHelper.cpp
@@ -77,6 +77,8 @@ class TLogHelper
TLogHelper::TLogHelper(const char * szNewMainTitle, const TCHAR * szNewSubTitle1, const TCHAR * szNewSubTitle2)
{
+ TCHAR szMainTitleT[0x80];
+
UserString = "";
UserCount = 1;
UserTotal = 1;
@@ -89,15 +91,18 @@ TLogHelper::TLogHelper(const char * szNewMainTitle, const TCHAR * szNewSubTitle1
bMessagePrinted = false;
bDontPrintResult = false;
+ // Copy the UNICODE main title
+ StringCopy(szMainTitleT, _countof(szMainTitleT), szMainTitle);
+
// Print the initial information
if(szMainTitle != NULL)
{
if(szSubTitle1 != NULL && szSubTitle2 != NULL)
- printf("Running %s (%s+%s) ...", szMainTitle, szSubTitle1, szSubTitle2);
+ _tprintf(_T("Running %s (%s+%s) ..."), szMainTitleT, szSubTitle1, szSubTitle2);
else if(szSubTitle1 != NULL)
- printf("Running %s (%s) ...", szMainTitle, szSubTitle1);
+ _tprintf(_T("Running %s (%s) ..."), szMainTitleT, szSubTitle1);
else
- printf("Running %s ...", szMainTitle);
+ _tprintf(_T("Running %s ..."), szMainTitleT);
}
}