diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
commit | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch) | |
tree | e5435159cd1bf0519276363a6fe1663d1721bed3 /src/pal/tests/palsuite/miscellaneous | |
parent | 4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff) | |
download | coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2 coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip |
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/pal/tests/palsuite/miscellaneous')
218 files changed, 93 insertions, 4000 deletions
diff --git a/src/pal/tests/palsuite/miscellaneous/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CMakeLists.txt index 86f194198b..0fd4df8ad5 100644 --- a/src/pal/tests/palsuite/miscellaneous/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CMakeLists.txt @@ -27,9 +27,6 @@ add_subdirectory(InterLockedExchangeAdd) add_subdirectory(InterlockedExchangePointer) add_subdirectory(InterlockedIncrement) add_subdirectory(InterlockedIncrement64) -add_subdirectory(lstrcatW) -add_subdirectory(lstrcpynW) -add_subdirectory(lstrcpyW) add_subdirectory(lstrlenA) add_subdirectory(lstrlenW) add_subdirectory(queryperformancecounter) @@ -37,8 +34,5 @@ add_subdirectory(queryperformancefrequency) add_subdirectory(SetEnvironmentVariableA) add_subdirectory(SetEnvironmentVariableW) add_subdirectory(SetLastError) -add_subdirectory(wsprintfA) -add_subdirectory(wsprintfW) add_subdirectory(_i64tow) -add_subdirectory(_ui64tow) diff --git a/src/pal/tests/palsuite/miscellaneous/CharNextA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CharNextA/test1/CMakeLists.txt index 8506d86737..23df52b430 100644 --- a/src/pal/tests/palsuite/miscellaneous/CharNextA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CharNextA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_charnexta_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/CharNextA/test1/test.c b/src/pal/tests/palsuite/miscellaneous/CharNextA/test1/test.cpp index d2a3db31d5..d2a3db31d5 100644 --- a/src/pal/tests/palsuite/miscellaneous/CharNextA/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/CharNextA/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/CharNextA/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CharNextA/test2/CMakeLists.txt index 04f4679630..5f089e963c 100644 --- a/src/pal/tests/palsuite/miscellaneous/CharNextA/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CharNextA/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_charnexta_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/CharNextA/test2/test.c b/src/pal/tests/palsuite/miscellaneous/CharNextA/test2/test.cpp index 7261959021..7261959021 100644 --- a/src/pal/tests/palsuite/miscellaneous/CharNextA/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/CharNextA/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/CharNextExA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CharNextExA/test1/CMakeLists.txt index bfa12b5526..ae1433f089 100644 --- a/src/pal/tests/palsuite/miscellaneous/CharNextExA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CharNextExA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_charnextexa_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/CharNextExA/test1/test.c b/src/pal/tests/palsuite/miscellaneous/CharNextExA/test1/test.cpp index 9671ca86b8..9671ca86b8 100644 --- a/src/pal/tests/palsuite/miscellaneous/CharNextExA/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/CharNextExA/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/CharNextExA/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CharNextExA/test2/CMakeLists.txt index 556043abcd..1c81d1f9a4 100644 --- a/src/pal/tests/palsuite/miscellaneous/CharNextExA/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CharNextExA/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_charnextexa_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/CharNextExA/test2/test.c b/src/pal/tests/palsuite/miscellaneous/CharNextExA/test2/test.cpp index ffc153f5e6..ffc153f5e6 100644 --- a/src/pal/tests/palsuite/miscellaneous/CharNextExA/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/CharNextExA/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/CMakeLists.txt index bbe37ddd19..78bb701959 100644 --- a/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_closehandle_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/test.c b/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/test.cpp index 8e42229c29..443f89bace 100644 --- a/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/test.cpp @@ -30,7 +30,7 @@ int __cdecl main(int argc, char *argv[]) return FAIL; } - WriteBuffer = malloc(sizeof(WORD)); + WriteBuffer = (LPDWORD)malloc(sizeof(WORD)); if ( WriteBuffer == NULL ) { diff --git a/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/CMakeLists.txt index 75de513be7..18350f20ad 100644 --- a/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_closehandle_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/test.c b/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/test.cpp index c1eea44070..c1eea44070 100644 --- a/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/CMakeLists.txt index af878cb873..15a0f572bb 100644 --- a/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_createpipe_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/test1.c b/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/test1.cpp index 3930183b60..3930183b60 100644 --- a/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/test1.c +++ b/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/test1.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/CMakeLists.txt index fbd8b0f87d..47ee4b0abd 100644 --- a/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_flushinstructioncache_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/test1.c b/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/test1.cpp index cdbefd01cc..cdbefd01cc 100644 --- a/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/test1.c +++ b/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/test1.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/CMakeLists.txt index 0f242e9b30..df91482855 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_formatmessagew_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/test.cpp index 0cc4c43432..0cc4c43432 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/CMakeLists.txt index 26092ac300..818649aac7 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_formatmessagew_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.c b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp index 6c2d80b3f4..6c2d80b3f4 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/CMakeLists.txt index b430511c4c..516d4bcc9a 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_formatmessagew_test3 diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/test.c b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/test.cpp index a390c00fea..a390c00fea 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/test.c +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/CMakeLists.txt index cae8ff149c..642727c6dc 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_formatmessagew_test4 diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/test.c b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/test.cpp index 4f865efe7e..4f865efe7e 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/test.c +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/CMakeLists.txt index 6779f94ff9..bae113475d 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_formatmessagew_test5 diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/test.c b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/test.cpp index 148c2ff236..148c2ff236 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/test.c +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/CMakeLists.txt index 450b2b808b..f403cba0f4 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_formatmessagew_test6 diff --git a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/test.c b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/test.cpp index 48f5e3e93d..48f5e3e93d 100644 --- a/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/test.c +++ b/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/CMakeLists.txt index be39b63ec9..206707efa6 100644 --- a/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_freeenvironmentstringsw_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/test.cpp index 56010039d7..56010039d7 100644 --- a/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/CMakeLists.txt index a3688dd24a..d8197d1c90 100644 --- a/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_freeenvironmentstringsw_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/test.c b/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/test.cpp index 1bb05cdb12..1bb05cdb12 100644 --- a/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test1/CMakeLists.txt index e3acf4061a..92cabba428 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetCalendarInfoW.c + GetCalendarInfoW.cpp ) add_executable(paltest_getcalendarinfow_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test1/GetCalendarInfoW.c b/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test1/GetCalendarInfoW.cpp index 4876fe180f..4876fe180f 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test1/GetCalendarInfoW.c +++ b/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test1/GetCalendarInfoW.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test2/CMakeLists.txt index cbfd1aa5db..0cfc9679e7 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetCalendarInfoW.c + GetCalendarInfoW.cpp ) add_executable(paltest_getcalendarinfow_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test2/GetCalendarInfoW.c b/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test2/GetCalendarInfoW.cpp index d8a59a0fc0..d8a59a0fc0 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test2/GetCalendarInfoW.c +++ b/src/pal/tests/palsuite/miscellaneous/GetCalendarInfoW/test2/GetCalendarInfoW.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/CMakeLists.txt index 491fdca9b5..d15b84a59e 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getcommandlinew_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.cpp index d8a81746b6..3417c149a0 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.cpp @@ -31,7 +31,7 @@ int __cdecl main(int argc, char *argv[]) return FAIL; } - CommandLine = malloc(1024); + CommandLine = (WCHAR*)malloc(1024); wcscpy(CommandLine,convert(argv[0])); for(i=1;i<argc;++i) diff --git a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/CMakeLists.txt index 980dae88ae..0ce9ac07b7 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getcomputernamew_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/test.cpp index 7a00cad598..7a00cad598 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg1/CMakeLists.txt index 5a340c6cfb..04ef85b74d 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetDateFormatW_neg.c + GetDateFormatW_neg.cpp ) add_executable(paltest_getdateformatw_getdateformatw_neg1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg1/GetDateFormatW_neg.c b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg1/GetDateFormatW_neg.cpp index c64dc74cb6..96a481167f 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg1/GetDateFormatW_neg.c +++ b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg1/GetDateFormatW_neg.cpp @@ -55,7 +55,7 @@ int __cdecl main(int argc, char *argv[]) Fail("\nRetrieved an invalid buffer size\n"); } - wpBuffer = malloc((DateSize + 1)*sizeof(WCHAR)); + wpBuffer = (WCHAR*)malloc((DateSize + 1)*sizeof(WCHAR)); if(NULL == wpBuffer) { free(wpFormat); diff --git a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg2/CMakeLists.txt index 646de9160b..fcd56fc7f2 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetDateFormatW_neg.c + GetDateFormatW_neg.cpp ) add_executable(paltest_getdateformatw_getdateformatw_neg2 diff --git a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg2/GetDateFormatW_neg.c b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg2/GetDateFormatW_neg.cpp index 676038f03a..43f32cf69e 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg2/GetDateFormatW_neg.c +++ b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/GetDateFormatW_neg2/GetDateFormatW_neg.cpp @@ -67,7 +67,7 @@ int __cdecl main(int argc, char *argv[]) Fail("\nRetrieved an invalid buffer size\n"); } - wpBuffer = malloc((DateSize + 1)*sizeof(WCHAR)); + wpBuffer = (WCHAR*)malloc((DateSize + 1)*sizeof(WCHAR)); if(NULL == wpBuffer) { free(wpFormat); diff --git a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/test1/CMakeLists.txt index 8c1e4b024e..bd86370611 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetDateFormatW.c + GetDateFormatW.cpp ) add_executable(paltest_getdateformatw_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/test1/GetDateFormatW.c b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/test1/GetDateFormatW.cpp index 264e397a49..6e3c3b4894 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/test1/GetDateFormatW.c +++ b/src/pal/tests/palsuite/miscellaneous/GetDateFormatW/test1/GetDateFormatW.cpp @@ -68,7 +68,7 @@ int __cdecl main(int argc, char *argv[]) } - wpBuffer = malloc((DateSize+1)*sizeof(WCHAR)); + wpBuffer = (WCHAR*)malloc((DateSize+1)*sizeof(WCHAR)); if(NULL == wpBuffer) { free(wpFormat); diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/CMakeLists.txt index 306400e558..3a745fdbd3 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentstringsw_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/test.cpp index 2bd9153e59..2bd9153e59 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/CMakeLists.txt index 184a6ef1f0..0721fd60b7 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentvariablea_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp index 8862e823bc..23e9974467 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp @@ -37,7 +37,7 @@ int __cdecl main(int argc, char *argv[]) { size = ReturnValueForLargeBuffer = GetEnvironmentVariable("PATH", pResultBuffer, 0); - pResultBuffer = malloc(size); + pResultBuffer = (char*)malloc(size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer. " diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/CMakeLists.txt index abfd73f458..a9be983369 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentvariablea_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/test.cpp index d26588e907..d26588e907 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/CMakeLists.txt index a63c11b1a3..1c35eba54d 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentvariablea_test3 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/test.cpp index b51e139c95..b51e139c95 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/CMakeLists.txt index 76cfdb6d49..331ea8ca6b 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentvariablea_test4 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/test.cpp index 1fea5719b4..a09eb883e3 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/test.cpp @@ -45,7 +45,7 @@ int __cdecl main(int argc, char *argv[]) { pResultBuffer, // Buffer for Value 0); // Buffer size - pResultBuffer = malloc(size); + pResultBuffer = (char*)malloc(size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer. " diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/CMakeLists.txt index 548d86bb03..69bedf4947 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test5.c + test5.cpp ) add_executable(paltest_getenvironmentvariablea_test5 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/test5.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/test5.cpp index 8d63a1aecb..19a4d25b64 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/test5.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/test5.cpp @@ -64,7 +64,7 @@ int __cdecl main(int argc, char *argv[]) /* To account for the null character at the end of the string */ size = size + 1; - pResultBuffer = malloc(sizeof(char)*size); + pResultBuffer = (char*)malloc(sizeof(char)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer\n."); @@ -105,7 +105,7 @@ int __cdecl main(int argc, char *argv[]) } /* Reallocate the memory for the string */ - pResultBuffer = malloc(sizeof(char)*size); + pResultBuffer = (char*)malloc(sizeof(char)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer."); diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/CMakeLists.txt index a0873bb7e7..38c186740f 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test6.c + test6.cpp ) add_executable(paltest_getenvironmentvariablea_test6 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/test6.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/test6.cpp index 8ef7571f59..837036a0a9 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/test6.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/test6.cpp @@ -59,7 +59,7 @@ int __cdecl main(int argc, char *argv[]) /* To account for the nul character at the end of the string */ size = size + 1; - pResultBuffer = malloc(sizeof(char)*size); + pResultBuffer = (char*)malloc(sizeof(char)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/CMakeLists.txt index 567c992461..a3cb878ef4 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentvariablew_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp index 6c764509d0..cb5fc00554 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp @@ -39,7 +39,7 @@ int __cdecl main(int argc, char *argv[]) pResultBuffer, 0); - pResultBuffer = malloc(size*sizeof(WCHAR)); + pResultBuffer = (WCHAR*)malloc(size*sizeof(WCHAR)); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer. " diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/CMakeLists.txt index 7234f61ed3..2c6ec6247e 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentvariablew_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/test.cpp index 6fa753c8d3..6fa753c8d3 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/CMakeLists.txt index bafd75e52e..6af382b6cd 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentvariablew_test3 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/test.cpp index 03781e723f..03781e723f 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/CMakeLists.txt index f870bd6b22..674b187fa7 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getenvironmentvariablew_test4 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/test.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/test.cpp index b5894efc6e..1ee3e72c9d 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/test.cpp @@ -43,7 +43,7 @@ int __cdecl main(int argc, char *argv[]) { pResultBuffer, // Buffer for Value 0); // Buffer size - pResultBuffer = malloc(size*sizeof(WCHAR)); + pResultBuffer = (WCHAR*)malloc(size*sizeof(WCHAR)); GetEnvironmentVariable(convert("PALTEST"), pResultBuffer, diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/CMakeLists.txt index ab44781279..71e974703b 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test5.c + test5.cpp ) add_executable(paltest_getenvironmentvariablew_test5 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/test5.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/test5.cpp index 58eba3a380..179fc17f0b 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/test5.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/test5.cpp @@ -63,7 +63,7 @@ int __cdecl main(int argc, char *argv[]) /* To account for the nul character at the end of the string */ size = size + 1; - pResultBuffer = malloc(sizeof(WCHAR)*size); + pResultBuffer = (WCHAR*)malloc(sizeof(WCHAR)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); @@ -104,7 +104,7 @@ int __cdecl main(int argc, char *argv[]) } /* Reallocate the memory for the string */ - pResultBuffer = malloc(sizeof(WCHAR)*size); + pResultBuffer = (WCHAR*)malloc(sizeof(WCHAR)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/CMakeLists.txt index e504c8323a..8771ab0cc8 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test6.c + test6.cpp ) add_executable(paltest_getenvironmentvariablew_test6 diff --git a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/test6.c b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/test6.cpp index 85f31be9c2..e376950841 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/test6.c +++ b/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/test6.cpp @@ -59,7 +59,7 @@ int __cdecl main(int argc, char *argv[]) /* To account for the nul character at the end of the string */ size = size + 1; - pResultBuffer = malloc(sizeof(WCHAR)*size); + pResultBuffer = (WCHAR*)malloc(sizeof(WCHAR)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); diff --git a/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/CMakeLists.txt index 09e650c924..3c851c7260 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getlasterror_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/test.cpp index 65f56e595f..65f56e595f 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/CMakeLists.txt index 960291fe79..9419517128 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getsysteminfo_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/test.cpp index 5f3608fb70..5f3608fb70 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/CMakeLists.txt index 5c6ea26a41..f7be23bc0b 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_gettickcount_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/test.cpp index ad71ba5d6c..ad71ba5d6c 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/CMakeLists.txt index a1d5ab21b8..8ed7ace073 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getusernamew_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/test.cpp index 809f14c12d..809f14c12d 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt index b9dd711d36..2cb305f22b 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getversionexa_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.cpp index 5dd20c6576..5dd20c6576 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt index d7eb683343..09494240cc 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_getversionexw_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.cpp index 69aae54bcf..69aae54bcf 100644 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/CMakeLists.txt index d41e6bc5ab..bc3f11b705 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_isbadcodeptr_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/test1.c b/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/test1.cpp index 4b2763d457..4b2763d457 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/test1.c +++ b/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/test1.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/CMakeLists.txt index f1e84d73b8..82aecefa70 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_isbadreadptr_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/test.c b/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/test.cpp index 24b7ceb7e6..24b7ceb7e6 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/CMakeLists.txt index 2b2e6aae2e..e3a08167b3 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_isbadwriteptr_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/test.c b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/test.cpp index 018d7beae0..018d7beae0 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/CMakeLists.txt index c033f8054f..718cbaa297 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test2.c + test2.cpp ) add_executable(paltest_isbadwriteptr_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.c b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp index 2d4d53e3b7..2d4d53e3b7 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.c +++ b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/CMakeLists.txt index 32cb901e8d..0efd3179db 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test3.c + test3.cpp ) add_executable(paltest_isbadwriteptr_test3 diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.c b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp index 4c058a8987..4c058a8987 100644 --- a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.c +++ b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/CMakeLists.txt index 5e77e8ba98..bc80853ea1 100644 --- a/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_messageboxw_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/test.cpp index 8eb8c0eb7e..8eb8c0eb7e 100644 --- a/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/CMakeLists.txt index 4b0af2e77e..b8993af4cf 100644 --- a/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_messageboxw_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/test.c b/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/test.cpp index e2ff0cf6d6..e2ff0cf6d6 100644 --- a/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/CMakeLists.txt index b66248522b..5d63281eab 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_setenvironmentvariablea_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/test1.c b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/test1.cpp index 86a44218f1..86a44218f1 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/test1.c +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/test1.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/CMakeLists.txt index c062c6df65..fe05887c3e 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test2.c + test2.cpp ) add_executable(paltest_setenvironmentvariablea_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/test2.c b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/test2.cpp index 984007e6f1..984007e6f1 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/test2.c +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/test2.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/CMakeLists.txt index 159f574abe..98c9dc0a63 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test3.c + test3.cpp ) add_executable(paltest_setenvironmentvariablea_test3 diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/test3.c b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/test3.cpp index fa24275da7..539e33004b 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/test3.c +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/test3.cpp @@ -76,7 +76,7 @@ int __cdecl main(int argc, char *argv[]) /* increase size to account for the null char at the end */ size = size + 1; - pResultBuffer = malloc(sizeof(char)*size); + pResultBuffer = (char*)malloc(sizeof(char)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); @@ -107,7 +107,7 @@ int __cdecl main(int argc, char *argv[]) free(pResultBuffer); /* Reallocate the memory for the string */ - pResultBuffer = malloc(sizeof(char)*size); + pResultBuffer = (char*)malloc(sizeof(char)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/CMakeLists.txt index 29cca8d7b4..1c53d4b6a1 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test4.c + test4.cpp ) add_executable(paltest_setenvironmentvariablea_test4 diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/test4.c b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/test4.cpp index 557cef74c9..de3059c8d8 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/test4.c +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/test4.cpp @@ -59,7 +59,7 @@ int __cdecl main(int argc, char *argv[]) /* To account for the null character at the end of the string */ size = size + 1; - pResultBuffer = malloc(sizeof(char)*size); + pResultBuffer = (char*)malloc(sizeof(char)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/CMakeLists.txt index 247dceefd9..6eb52ab92e 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_setenvironmentvariablew_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp index bddbba7940..bddbba7940 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/CMakeLists.txt index a69343ccd5..a82d849bde 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_setenvironmentvariablew_test2 diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/test.c b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/test.cpp index 12f4887b6d..12f4887b6d 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/test.c +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/CMakeLists.txt index e9072c7143..266231e6e9 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test3.c + test3.cpp ) add_executable(paltest_setenvironmentvariablew_test3 diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/test3.c b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/test3.cpp index 02d0a2d6d9..5c4d4eba42 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/test3.c +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/test3.cpp @@ -76,7 +76,7 @@ int __cdecl main(int argc, char *argv[]) /* Increase size to account for the null char at the end */ size = size + 1; - pResultBuffer = malloc(sizeof(WCHAR)*size); + pResultBuffer = (WCHAR*)malloc(sizeof(WCHAR)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); @@ -106,7 +106,7 @@ int __cdecl main(int argc, char *argv[]) free(pResultBuffer); /* Reallocate the memory for the string */ - pResultBuffer = malloc(sizeof(WCHAR)*size); + pResultBuffer = (WCHAR*)malloc(sizeof(WCHAR)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/CMakeLists.txt index f5f48bab33..c82e0f0394 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test4.c + test4.cpp ) add_executable(paltest_setenvironmentvariablew_test4 diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/test4.c b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/test4.cpp index b8f7734de4..50c59d6e97 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/test4.c +++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/test4.cpp @@ -59,7 +59,7 @@ int __cdecl main(int argc, char *argv[]) /* To account for the nul character at the end of the string */ size = size + 1; - pResultBuffer = malloc(sizeof(WCHAR)*size); + pResultBuffer = (WCHAR*)malloc(sizeof(WCHAR)*size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer.\n"); diff --git a/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/CMakeLists.txt index 5248d6ce97..40eb2ff865 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_setlasterror_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/test.c b/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/test.cpp index d414626dd2..d414626dd2 100644 --- a/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/CMakeLists.txt index 6876d1b24e..c3c4b61999 100644 --- a/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_i64tow_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.c b/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.cpp index 9a87328b0d..9a8ae07089 100644 --- a/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.c +++ b/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.cpp @@ -6,7 +6,7 @@ ** ** Source: test1.c ** -** Purpose: Tests _i64tow with normal values and different radices, negative +** Purpose: Tests _i64tow_s with normal values and different radices, negative ** values, as well as the highest and lowest values. ** ** @@ -54,17 +54,17 @@ int __cdecl main(int argc, char *argv[]) for (i=0; i<sizeof(testCases) / sizeof(testCase); i++) { - ret = _i64tow(testCases[i].value, buffer, testCases[i].radix); - if (ret != buffer) + errno_t err = _i64tow_s(testCases[i].value, buffer, sizeof(buffer) / sizeof(buffer[0]), testCases[i].radix); + + if(err != 0) { - Fail("_i64tow did not return a pointer to the string.\n" - "Expected %p, got %p\n", buffer, ret); + Fail("ERROR: _i64tow_s didn't return success, error code %d.\n", err); } testStr = convert(testCases[i].result); if (wcscmp(testStr, buffer) != 0) { - Fail("_i64tow did not give the correct string.\n" + Fail("_i64tow_s did not give the correct string.\n" "Expected %S, got %S\n", testStr, buffer); } free(testStr); diff --git a/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat index a3979e60da..11982050e0 100644 --- a/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat +++ b/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat @@ -4,10 +4,10 @@ Version = 1.0 Section = miscellaneous -Function = _i64tow -Name = Test #1 for _i64tow +Function = _i64tow_s +Name = Test #1 for _i64tow_s TYPE = DEFAULT EXE1 = test1 Description -=Tests _i64tow with normal values and different radices, negative +=Tests _i64tow_s with normal values and different radices, negative =values, as well as the highest and lowest values. diff --git a/src/pal/tests/palsuite/miscellaneous/_ui64tow/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/_ui64tow/CMakeLists.txt deleted file mode 100644 index ef14ea5352..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/_ui64tow/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) -add_subdirectory(test2) - diff --git a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/CMakeLists.txt deleted file mode 100644 index f920c4bded..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - _ui64tow.c -) - -add_executable(paltest_ui64tow_test1 - ${SOURCES} -) - -add_dependencies(paltest_ui64tow_test1 coreclrpal) - -target_link_libraries(paltest_ui64tow_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/_ui64tow.c b/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/_ui64tow.c deleted file mode 100644 index fb94f2509f..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/_ui64tow.c +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================= -** -** Source: _ui64tow.c -** -** Purpose: Positive test the _ui64tow API. -** convert an integer to a wide character string -** -** -**============================================================*/ -#define UNICODE -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) -{ - int err; - WCHAR *wpBuffer = NULL; - char *pChar = NULL; - unsigned long ul = 1234567890UL; - char *pChar10 = "1234567890"; - char *pChar2 = "1001001100101100000001011010010"; - char *pChar16 = "499602d2"; - - /*Initialize the PAL environment*/ - err = PAL_Initialize(argc, argv); - if(0 != err) - { - return FAIL; - } - - wpBuffer = malloc(64 * sizeof(WCHAR)); - if(NULL == wpBuffer) - { - Fail("\nFail to allocate the buffer to save a converted " - "wide character string, error code=%d!\n", - GetLastError()); - } - - /*convert to a 10 base string*/ - _ui64tow(ul, wpBuffer, 10); - pChar = convertC(wpBuffer); - if(strcmp(pChar10, pChar)) - { - free(wpBuffer); - free(pChar); - Fail("\nFailed to call _ui64tow API to convert an interger " - "to a 10 base wide character string, error code=%d\n", - GetLastError()); - } - free(pChar); - free(wpBuffer); - - wpBuffer = malloc(64 * sizeof(WCHAR)); - if(NULL == wpBuffer) - { - Fail("\nFail to allocate the buffer to save a converted " - "wide character string, error code=%d!\n", - GetLastError()); - } - - /*convert to a 16 base string*/ - _ui64tow(ul, wpBuffer, 16); - pChar = convertC(wpBuffer); - if(strcmp(pChar16, pChar)) - { - free(wpBuffer); - free(pChar); - Fail("\nFailed to call _ui64tow API to convert an interger " - "to a 16 base wide character string, error code = %d\n", - GetLastError()); - } - free(pChar); - free(wpBuffer); - - wpBuffer = malloc(64 * sizeof(WCHAR)); - if(NULL == wpBuffer) - { - Fail("\nFail to allocate the buffer to save a converted " - "wide character string, error code=%d!\n", - GetLastError()); - } - /*convert to a 2 base string*/ - _ui64tow(ul, wpBuffer, 2); - pChar = convertC(wpBuffer); - if(strcmp(pChar2, pChar)) - { - free(wpBuffer); - free(pChar); - Fail("\nFailed to call _ui64tow API to convert an interger " - "to a 2 base wide character string, error code=%d\n", - GetLastError()); - } - free(pChar); - free(wpBuffer); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/testinfo.dat deleted file mode 100644 index a60f27a14a..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/testinfo.dat +++ /dev/null @@ -1,12 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = miscellaneous -Function = _ui64tow -Name = Positive test _ui64tow to convert an integer to a wide character string -TYPE = DEFAULT -EXE1 = _ui64tow -Description -=Test the _ui64tow API to convert an integer to a wide character string diff --git a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/CMakeLists.txt deleted file mode 100644 index b4feb4b8fd..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - _ui64tow.c -) - -add_executable(paltest_ui64tow_test2 - ${SOURCES} -) - -add_dependencies(paltest_ui64tow_test2 coreclrpal) - -target_link_libraries(paltest_ui64tow_test2 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/_ui64tow.c b/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/_ui64tow.c deleted file mode 100644 index f13250578c..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/_ui64tow.c +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================= -** -** Source: _ui64tow.c -** -** Purpose: Tests _ui64tow with normal values and different -** radices,highest and lowest values. -** -** -**============================================================*/ - -#include <palsuite.h> - -typedef struct -{ - unsigned __int64 value; - int radix; - char* result; -} testCase; - - -int __cdecl main(int argc, char *argv[]) -{ - WCHAR buffer[256]; - WCHAR *testStr; - WCHAR *ret; - int i; - testCase testCases[] = - { - /* test limits */ - {UI64(0xFFFFFFFFFFFFFFFF), 2, - "1111111111111111111111111111111111111111111111111111111111111111"}, - {UI64(0xFFFFFFFFFFFFFFFF), 8, "1777777777777777777777"}, - {UI64(0xFFFFFFFFFFFFFFFF), 10, "18446744073709551615"}, - {UI64(0xFFFFFFFFFFFFFFFF), 16, "ffffffffffffffff"}, - {47, 2, "101111"}, - {47, 8, "57"}, - {47, 10, "47"}, - {47, 16, "2f"}, - {12, 2, "1100"}, - {12, 8, "14"}, - {12, 10, "12"}, - {12, 16, "c"}, - - /* test with 0. */ - {0, 2, "0"}, - {0, 8, "0"}, - {0, 10, "0"}, - {0, 16, "0"} - }; - - if (0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - for (i=0; i<sizeof(testCases) / sizeof(testCase); i++) - { - ret = _ui64tow(testCases[i].value, buffer, testCases[i].radix); - - if (ret != buffer) - { - Fail("Failed to call _ui64tow API: did not return a pointer " - "to string. Expected %p, got %p\n", buffer, ret); - } - - testStr = convert(testCases[i].result); - - if (wcscmp(testStr, buffer) != 0) - { - Trace("ERROR: _ui64tow test#%d. Expected <%S>, got <%S>.\n", - i,testStr, buffer); - free(testStr); - Fail(""); - } - - free(testStr); - } - - PAL_Terminate(); - return PASS; -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/testinfo.dat deleted file mode 100644 index 0abbca2d11..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/_ui64tow/test2/testinfo.dat +++ /dev/null @@ -1,13 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = miscellaneous -Function = _ui64tow -Name = Positive test _ui64tow to convert an integer to a wide character string -TYPE = DEFAULT -EXE1 = _ui64tow -Description -=Test the _ui64tow API to convert an integer to a wide character string -=Test the limits. and 0. diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcatW/CMakeLists.txt deleted file mode 100644 index a3847f8ca9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) -add_subdirectory(test2) -add_subdirectory(test3) -add_subdirectory(test4) - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/CMakeLists.txt deleted file mode 100644 index aa5b0c2646..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_lstrcatw_test1 - ${SOURCES} -) - -add_dependencies(paltest_lstrcatw_test1 coreclrpal) - -target_link_libraries(paltest_lstrcatw_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/test.c deleted file mode 100644 index ad1095e014..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/test.c +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for lstrcatW() function -** -** -**=========================================================*/ - -#define UNICODE - -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) { - - WCHAR FirstString[10] = {'T','E','S','T','\0'}; - const WCHAR SecondString[] = {'P','A','L','!','\0'}; - WCHAR CorrectString[] = {'T','E','S','T','P','A','L','!','\0'}; - WCHAR* ReturnedPointer = NULL; - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - ReturnedPointer = lstrcat(FirstString,SecondString); - - /* Check to see if the pointer returned points to the concat string */ - if(ReturnedPointer != &FirstString[0]) - { - Fail("ERROR: The function was supposed to return a pointer to " - "the concatentated string, but it did not.\n"); - } - - /* Check to make sure the Concat string is the same as the predetermined - 'CorrectString' */ - if(memcmp(FirstString,CorrectString, - wcslen(FirstString)*sizeof(WCHAR)) != 0) - { - Fail("ERROR: The concatenated string should be %s but %s was the " - "result.\n", - convertC(CorrectString), - convertC(FirstString)); - } - - PAL_Terminate(); - return PASS; -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/testinfo.dat deleted file mode 100644 index 006e83b882..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test1/testinfo.dat +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = lstrcatW -Name = Positive test of lstrcatW -TYPE = DEFAULT -EXE1 = test -Description -= Test to see that concatenating two strings works, -= and also check return values in successful and failing situations. - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/CMakeLists.txt deleted file mode 100644 index 8a11c8f154..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test2.c -) - -add_executable(paltest_lstrcatw_test2 - ${SOURCES} -) - -add_dependencies(paltest_lstrcatw_test2 coreclrpal) - -target_link_libraries(paltest_lstrcatw_test2 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/test2.c b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/test2.c deleted file mode 100644 index 6c66bc8976..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/test2.c +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test2.c -** -** Purpose: Negative test for lstrcatW() function -** -** -**=========================================================*/ - -#define UNICODE - -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) { - - WCHAR FirstString[10] = {'T','E','S','T','\0'}; - const WCHAR SecondString[] = {'P','A','L','!','\0'}; - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - /* If either of these is NULL, function should fail and return NULL. */ - if(lstrcat(NULL,SecondString) != NULL) - { - Fail("ERROR: When NULL was passed to the first parameter of the " - "function, it should have returned " - "NULL as a result, but did not.\n"); - } - - if(lstrcat(FirstString,NULL) != NULL) - { - Fail("ERROR: When NULL was passed to the second parameter of the " - "function, it should have returned " - "NULL as a result, but did not.\n"); - } - - - PAL_Terminate(); - return PASS; -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/testinfo.dat deleted file mode 100644 index cc1ee644dc..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test2/testinfo.dat +++ /dev/null @@ -1,12 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = lstrcatW -Name = Negtive test of lstrcatW -TYPE = DEFAULT -EXE1 = test2 -Description -= Test to see lstrcat reports error with failing situations. diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/CMakeLists.txt deleted file mode 100644 index 1cdecedf1a..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test3.c -) - -add_executable(paltest_lstrcatw_test3 - ${SOURCES} -) - -add_dependencies(paltest_lstrcatw_test3 coreclrpal) - -target_link_libraries(paltest_lstrcatw_test3 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/test3.c b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/test3.c deleted file mode 100644 index 49a9c57555..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/test3.c +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test3.c -** -** Purpose: Testing lstrcatw with two NULL strings passed on -** -** -**=========================================================*/ - -#define UNICODE - -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) -{ - - - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - - /* testing the behaviour of lstrcatW with two NULL strings */ - if( lstrcat(NULL,NULL) != NULL) - { - - Fail("lstrcat:ERROR: the function should returned NULL\n"); - - } - - PAL_Terminate(); - return PASS; -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/testinfo.dat deleted file mode 100644 index 794bcdbff7..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test3/testinfo.dat +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 - -Section = Miscellaneous - -Function = lstrcatW - -Name = Negative testing for lstrcatW - -TYPE = DEFAULT - -EXE1 = test3 - -Description - -= Testing the behaviour after sending two strings contained NULL - - - - - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/CMakeLists.txt deleted file mode 100644 index 640c224f83..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test4.c -) - -add_executable(paltest_lstrcatw_test4 - ${SOURCES} -) - -add_dependencies(paltest_lstrcatw_test4 coreclrpal) - -target_link_libraries(paltest_lstrcatw_test4 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/test4.c b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/test4.c deleted file mode 100644 index abc9021518..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/test4.c +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test4.c -** -** Purpose: Testing the behaviour of lstrcatw when string2 contains -** special characters, this test case depends on: -** memcmp -** wcslen -** lstrcpyn -** -** -**=========================================================*/ - -#define UNICODE - -#include <palsuite.h> - -struct testCase -{ - WCHAR SecondString[5]; - WCHAR CorrectString[10]; -}; - -int __cdecl main(int argc, char *argv[]) -{ - - WCHAR FirstString[10] = {'T','E','S','T','\0'}; - WCHAR TestString[10] = {'T','E','S','T','\0'}; - int i = 0; - - /* - * this structure includes several strings to be tested with - * lstrcatW function and the expected results - */ - - struct testCase testCases[]= - { - {{'\t','T','A','B','\0'}, - {'T','E','S','T','\t','T','A','B','\0'}}, - {{'2','T','\?','B','\0'}, - {'T','E','S','T','2','T','\?','B','\0'}}, - {{'\v','T','E','\v','\0'}, - {'T','E','S','T','\v','T','E','\v','\0'}}, - {{'T','\a','E','\a','\0'}, - {'T','E','S','T','T','\a','E','\a','\0'}}, - {{'0','\f','Z','\f','\0'}, - {'T','E','S','T','0','\f','Z','\f','\0'}}, - {{'\r','H','I','\r','\0'}, - {'T','E','S','T','\r','H','I','\r','\0'}}, - {{'H','I','\"','\"','\0'}, - {'T','E','S','T','H','I','\"','\"','\0'}}, - {{'H','\b','I','\b','\0'}, - {'T','E','S','T','H','\b','I','\b','\0'}}, - {{'H','\n','I','\n','\0'}, - {'T','E','S','T','H','\n','I','\n','\0'}} - }; - - - - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - - /* Loop through the struct and validate the resulted string */ - for( i = 0; i < sizeof(testCases)/sizeof(struct testCase); i++) - { - - lstrcat(FirstString, testCases[i].SecondString); - - if(memcmp(FirstString,testCases[i].CorrectString, - wcslen(FirstString)*sizeof(WCHAR))) - { - - Fail("ERROR: the function failed with a special character.\n"); - } - - /* reinitialize the first string */ - lstrcpyn(FirstString,TestString,10); - - } - - - - - PAL_Terminate(); - return PASS; -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/testinfo.dat deleted file mode 100644 index 96235fb257..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcatW/test4/testinfo.dat +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 - -Section = Miscellaneous - -Function = lstrcatW - -Name = Positive testing for lstrcatW - -TYPE = DEFAULT - -EXE1 = test4 - -Description - -= Testing the behaviour of lstrcatw when string2 contains - -= special characters and validate the resulted string - - - - - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcpyW/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcpyW/CMakeLists.txt deleted file mode 100644 index f6aa0cb2d9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcpyW/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/CMakeLists.txt deleted file mode 100644 index e39c9a6098..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_lstrcpyw_test1 - ${SOURCES} -) - -add_dependencies(paltest_lstrcpyw_test1 coreclrpal) - -target_link_libraries(paltest_lstrcpyw_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/test.c deleted file mode 100644 index 881ba033e8..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/test.c +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for lstrcpyW() function -** -** -**=========================================================*/ - -#define UNICODE - -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) -{ - WCHAR FirstString[5] = {'T','E','S','T','\0'}; - WCHAR ResultBuffer[5]; - WCHAR* ResultPointer = NULL; - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - ResultPointer = lstrcpy(ResultBuffer,FirstString); - - /* Check the return value */ - if(ResultPointer != &ResultBuffer[0]) - { - Fail("ERROR: The function did not return a pointer to the Result " - "Buffer after being called.\n"); - } - - /* A straight copy, the values should be equal. */ - if(memcmp(ResultBuffer,FirstString,wcslen(ResultBuffer)*2+2) != 0) - { - Fail("ERROR: The result of the copy was '%s' when it should have " - "been '%s'.\n",convertC(ResultBuffer),convertC(FirstString)); - } - - /* If either param is NULL, it should return NULL. */ - if(lstrcpy(ResultBuffer,NULL) != NULL) - { - Fail("ERROR: The second parameter was NULL, so the function should " - "fail and return NULL.\n"); - } - if(lstrcpy(NULL,FirstString) != NULL) - { - Fail("ERROR: The first parameter was NULL, so the function should " - "fail and return NULL.\n"); - } - - - PAL_Terminate(); - return PASS; -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/testinfo.dat deleted file mode 100644 index 37c9835236..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcpyW/test1/testinfo.dat +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = lstrcpyW -Name = Positive test of lstrcpyW -TYPE = DEFAULT -EXE1 = test -Description -= Ensure that a copy of a string works, and that the return values -= are correct for success and failure. - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcpynW/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcpynW/CMakeLists.txt deleted file mode 100644 index f6aa0cb2d9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcpynW/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/CMakeLists.txt deleted file mode 100644 index 4344b89402..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_lstrcpynw_test1 - ${SOURCES} -) - -add_dependencies(paltest_lstrcpynw_test1 coreclrpal) - -target_link_libraries(paltest_lstrcpynw_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/test.c deleted file mode 100644 index 1ae0c51474..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/test.c +++ /dev/null @@ -1,73 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for lstrcpynW() function -** -** -**=========================================================*/ - -#define UNICODE - -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) { - - WCHAR FirstString[5] = {'T','E','S','T','\0'}; - WCHAR CorrectBuffer[3] = {'T','E','\0'}; - WCHAR ResultBuffer[5]; - WCHAR* ResultPointer = NULL; - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - /* A straight copy, the values should be equal. */ - ResultPointer = lstrcpyn(ResultBuffer,FirstString,3); - - /* Make sure the returned pointer is to the result buffer */ - if(ResultPointer != &ResultBuffer[0]) - { - Fail("ERROR: The function didn't return a pointer which points to the " - "location of the buffer which was copied into.\n"); - } - - /* Check to see that values are equal */ - if(memcmp(ResultBuffer, - CorrectBuffer, - wcslen(ResultBuffer)*sizeof(WCHAR)) != 0) - { - Fail("ERROR: '%s' was the result and it should have been '%s' when " - "this copy was performed.\n", - convertC(ResultBuffer),convertC(CorrectBuffer)); - } - - /* Null values should get Null results */ - if(lstrcpyn(ResultBuffer,NULL,3) != NULL) - { - Fail("ERROR: When the second parameter was set to NULL, the return " - "value should have been NULL, but it was not.\n"); - } - - if(lstrcpyn(NULL,FirstString,3) != NULL) - { - Fail("ERROR: When the first parameter was set to NULL, the return " - "value should have been NULL, but it was not.\n"); - } - - - PAL_Terminate(); - return PASS; -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/testinfo.dat deleted file mode 100644 index 111a57928a..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/lstrcpynW/test1/testinfo.dat +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = lstrcpynW -Name = Positive test of lstrcpynW -TYPE = DEFAULT -EXE1 = test -Description -= Ensure that a copy of a string works, and that the return values -= are correct for success and failure. - - - diff --git a/src/pal/tests/palsuite/miscellaneous/lstrlenA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrlenA/test1/CMakeLists.txt index 807a5d83b9..6bb520100d 100644 --- a/src/pal/tests/palsuite/miscellaneous/lstrlenA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/lstrlenA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_lstrlena_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/lstrlenA/test1/test.c b/src/pal/tests/palsuite/miscellaneous/lstrlenA/test1/test.cpp index 13e935ba50..13e935ba50 100644 --- a/src/pal/tests/palsuite/miscellaneous/lstrlenA/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/lstrlenA/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/lstrlenW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/lstrlenW/test1/CMakeLists.txt index fe6fc9691b..4209cbee89 100644 --- a/src/pal/tests/palsuite/miscellaneous/lstrlenW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/lstrlenW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test.c + test.cpp ) add_executable(paltest_lstrlenw_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/lstrlenW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/lstrlenW/test1/test.cpp index 49bc6d8f67..49bc6d8f67 100644 --- a/src/pal/tests/palsuite/miscellaneous/lstrlenW/test1/test.c +++ b/src/pal/tests/palsuite/miscellaneous/lstrlenW/test1/test.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/CMakeLists.txt index d76467aeab..ba53f42ccc 100644 --- a/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_queryperformancecounter_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/test1.c b/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/test1.cpp index 55b173add7..55b173add7 100644 --- a/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/test1.c +++ b/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/test1.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/CMakeLists.txt index 352e51342d..bc6bd22d5d 100644 --- a/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_queryperformancefrequency_test1 diff --git a/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/test1.c b/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/test1.cpp index de08063a74..de08063a74 100644 --- a/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/test1.c +++ b/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/test1.cpp diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/CMakeLists.txt deleted file mode 100644 index f40d4151d6..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) -add_subdirectory(test11) -add_subdirectory(test12) -add_subdirectory(test13) -add_subdirectory(test2) -add_subdirectory(test3) -add_subdirectory(test6) -add_subdirectory(test7) -add_subdirectory(test8) -add_subdirectory(test9) - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/CMakeLists.txt deleted file mode 100644 index ef589329f0..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test1 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test1 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/test.c deleted file mode 100644 index 722270965d..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/test.c +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - - char * ErrorMessage; - char buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -int test1() -{ - char checkstr[] = "hello world"; - - wsprintf(buf, "hello world"); - - /* Error message */ - ErrorMessage = "ERROR: (Test 1) Failed on 'hello world' test. The " - "correct string is 'hello world' and the result returned was "; - - return (memcmp(checkstr, buf, strlen(checkstr)+1) != 0); -} - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,buf); - } - - PAL_Terminate(); - return PASS; - -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/testinfo.dat deleted file mode 100644 index c06f4c01aa..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test1/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the very basic functionality of wsprintf. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/CMakeLists.txt deleted file mode 100644 index 92c44b9341..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test11 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test11 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test11 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/test.c deleted file mode 100644 index b43299a045..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/test.c +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char buf[256]; - -BOOL test1() -{ - int pos = 42; - - - /* Test 1 */ - wsprintf(buf, "foo %u", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %lu", 0xFFFF); - if (memcmp(buf, "foo 65535", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is " - "'foo 65535' and the result returned was "; - return FAIL; - } - - /* Test 3 */ - wsprintf(buf, "foo %hu", 0xFFFF); - if (memcmp(buf, "foo 65535", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is " - "'foo 65535' and the result returned was "; - return FAIL; - } - - /* Test 4 */ - wsprintf(buf, "foo %3u", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %-3u", pos); - if (memcmp(buf, "foo 42 ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %.1u", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %.3u", pos); - if (memcmp(buf, "foo 042", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo 042' and the result returned was "; - return FAIL; - } - - /* Test 8 */ - wsprintf(buf, "foo %03u", pos); - if (memcmp(buf, "foo 042", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is " - "'foo 042' and the result returned was "; - return FAIL; - } - - /* Test 9 */ - wsprintf(buf, "foo %#u", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 9) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - return PASS; -} - - -int __cdecl main(int argc, char *argv[]) -{ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s'%s'\n",ErrorMessage,buf); - } - - PAL_Terminate(); - return PASS; -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/testinfo.dat deleted file mode 100644 index c5f1ec1975..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test11/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %u formatter. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/CMakeLists.txt deleted file mode 100644 index e4013ad9e3..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test12 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test12 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test12 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/test.c deleted file mode 100644 index dcc61019d4..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/test.c +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char buf[256]; - -BOOL test1() -{ - int pos = 0x1234ab; - - /* Test 1 */ - wsprintf(buf, "foo %x", pos); - if (memcmp(buf, "foo 1234ab", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct " - "string is 'foo 1234ab' and the result returned was "; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %lx", pos); - if (memcmp(buf, "foo 1234ab", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct " - "string is 'foo 1234ab' and the result returned was "; - return FAIL; - } - - - /* Test 3 */ - wsprintf(buf, "foo %7x", pos); - if (memcmp(buf, "foo 1234ab", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is " - "'foo 1234ab' and the result returned was "; - return FAIL; - } - - /* Test 4 */ - wsprintf(buf, "foo %-7x", pos); - if (memcmp(buf, "foo 1234ab ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo 1234ab' and the result returned was "; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %.1x", pos); - if (memcmp(buf, "foo 1234ab", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo 1234ab' and the result returned was "; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %.7x", pos); - if (memcmp(buf, "foo 01234ab", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo 01234ab' and the result returned was "; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %07x", pos); - if (memcmp(buf, "foo 01234ab", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo 01234ab' and the result returned was "; - return FAIL; - } - - /* Test 8 */ - wsprintf(buf, "foo %#x", pos); - if (memcmp(buf, "foo 0x1234ab", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is " - "'foo 0x1234ab' and the result returned was "; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,buf); - } - - PAL_Terminate(); - return PASS; -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/testinfo.dat deleted file mode 100644 index 71c8386f27..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test12/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %x formatter. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/CMakeLists.txt deleted file mode 100644 index 423b05d8d9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test13 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test13 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test13 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/test.c deleted file mode 100644 index e1f7d80a0f..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/test.c +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char buf[256]; - -BOOL test1() -{ - int pos = 0x1234ab; - - /* Test 1 */ - wsprintf(buf, "foo %X", pos); - if (memcmp(buf, "foo 1234AB", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is " - " 'foo 1234AB' and the result returned was "; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %lX", pos); - if (memcmp(buf, "foo 1234AB", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is " - "'foo 1234AB' and the result returned was "; - return FAIL; - } - - - /* Test 3 */ - wsprintf(buf, "foo %7X", pos); - if (memcmp(buf, "foo 1234AB", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is " - "'foo 1234AB' and the result returned was "; - return FAIL; - } - - /* Test 4 */ - wsprintf(buf, "foo %-7X", pos); - if (memcmp(buf, "foo 1234AB ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo 1234AB' and the result returned was "; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %.1X", pos); - if (memcmp(buf, "foo 1234AB", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo 1234AB' and the result returned was "; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %.7X", pos); - if (memcmp(buf, "foo 01234AB", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo 01234AB' and the result returned was "; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %07X", pos); - if (memcmp(buf, "foo 01234AB", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo 01234AB' and the result returned was "; - return FAIL; - } - - /* Test 8 */ - wsprintf(buf, "foo %#X", pos); - if (memcmp(buf, "foo 0X1234AB", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is " - "'foo 0X1234AB' and the result returned was "; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,buf); - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/testinfo.dat deleted file mode 100644 index 0e0d1b4633..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test13/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %X formatter. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/CMakeLists.txt deleted file mode 100644 index 546a1daa38..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test2 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test2 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test2 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/test.c deleted file mode 100644 index b879e54043..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/test.c +++ /dev/null @@ -1,123 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char * BadResult; -char buf[256]; - -BOOL test1() -{ - - - /* Test 1 */ - wsprintf(buf, "foo %s", "bar"); - if (memcmp(buf, "foo bar", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is " - "'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %hs", "bar"); - if (memcmp(buf, "foo bar", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is " - "'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - - /* Test 3 */ - wsprintf(buf, "foo %5s", "bar"); - if (memcmp(buf, "foo bar", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is " - "'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - /* Test 4 */ - wsprintf(buf, "foo %.2s", "bar"); - if (memcmp(buf, "foo ba", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo ba' and the result returned was "; - BadResult = buf; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %5.2s", "bar"); - if (memcmp(buf, "foo ba", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo ba' and the result returned was "; - BadResult = buf; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %-5s", "bar"); - if (memcmp(buf, "foo bar ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %05s", "bar"); - if (memcmp(buf, "foo 00bar", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo 00bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - return PASS; -} - - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,BadResult); - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/testinfo.dat deleted file mode 100644 index 32e51df28b..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test2/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %s and %ls formatters with various flags. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/CMakeLists.txt deleted file mode 100644 index 8043ccd60b..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test3 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test3 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test3 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/test.c deleted file mode 100644 index bb598d9d63..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/test.c +++ /dev/null @@ -1,121 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char buf[256]; - -BOOL test1() -{ - - /* Test 1 */ - wsprintf(buf, "foo %S", convert("bar")); - if (memcmp(buf, "foo bar", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is " - "'foo bar' and the result returned was "; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %hS", "bar"); - if (memcmp(buf, "foo bar", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is " - "'foo bar' and the result returned was "; - return FAIL; - } - - /* Test 3 */ - wsprintf(buf, "foo %lS", convert("bar")); - if (memcmp(buf, "foo bar", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is '" - "foo bar' and the result returned was "; - return FAIL; - } - - - /* Test 4 */ - wsprintf(buf, "foo %5S", convert("bar")); - if (memcmp(buf, "foo bar", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo bar' and the result returned was "; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %.2S", convert("bar")); - if (memcmp(buf, "foo ba", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo ba' and the result returned was "; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %5.2S", convert("bar")); - if (memcmp(buf, "foo ba", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo ba' and the result returned was "; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %-5S", convert("bar")); - if (memcmp(buf, "foo bar ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo bar ' and the result returned was "; - return FAIL; - } - - /* Test 8 */ - wsprintf(buf, "foo %05S", convert("bar")); - if (memcmp(buf, "foo 00bar", strlen(buf) + 1) != 0) { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is " - "'foo 00bar' and the result returned was "; - return FAIL; - } - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) { - Fail("%s '%s'\n",ErrorMessage,buf); - - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/testinfo.dat deleted file mode 100644 index 0660aa17a3..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test3/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %S and wide characters in general. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/CMakeLists.txt deleted file mode 100644 index 6a5caf95c2..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test6 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test6 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test6 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/test.c deleted file mode 100644 index 08d97f467a..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/test.c +++ /dev/null @@ -1,114 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char buf[256]; - -BOOL test1() -{ - WCHAR wc = 'c'; - - /* Test 1 */ - wsprintf(buf, "foo %c", 'b'); - if (memcmp(buf, "foo b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is " - "'foo b' and the result returned was "; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %hc", 'b'); - if (memcmp(buf, "foo b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is " - "'foo b' and the result returned was "; - return FAIL; - } - - /* Test 3 */ - wsprintf(buf, "foo %lc", wc); - if (memcmp(buf, "foo c", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is " - "'foo c' and the result returned was "; - return FAIL; - } - - - /* Test 4 */ - wsprintf(buf, "foo %5c", 'b'); - if (memcmp(buf, "foo b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo bar' and the result returned was "; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %-5c", 'b'); - if (memcmp(buf, "foo b ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo b ' and the result returned was "; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %05c", 'b'); - if (memcmp(buf, "foo 0000b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo 0000b' and the result returned was "; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %#c", 'b'); - if (memcmp(buf, "foo b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo b' and the result returned was "; - return FAIL; - } - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,buf); - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/testinfo.dat deleted file mode 100644 index 31b0f667b6..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test6/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %c formatter. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/CMakeLists.txt deleted file mode 100644 index 0885f0f21e..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test7 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test7 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test7 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/test.c deleted file mode 100644 index 6d380efaa9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/test.c +++ /dev/null @@ -1,112 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char buf[256]; - -BOOL test1() -{ - WCHAR wb = 'b'; - - /* Test 1 */ - wsprintf(buf, "foo %C", wb); - if (memcmp(buf, "foo b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is " - "'foo b' and the result returned was "; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %hC", wb); - if (memcmp(buf, "foo b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is " - "'foo b' and the result returned was "; - return FAIL; - } - - /* Test 3 */ - wsprintf(buf, "foo %lC", 'c'); - if (memcmp(buf, "foo c", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is " - "'foo c' and the result returned was "; - return FAIL; - } - - - /* Test 4 */ - wsprintf(buf, "foo %5C", wb); - if (memcmp(buf, "foo b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo b' and the result returned was "; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %-5C", wb); - if (memcmp(buf, "foo b ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo b ' and the result returned was "; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %05C", wb); - if (memcmp(buf, "foo 0000b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo 0000b' and the result returned was "; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %#C", wb); - if (memcmp(buf, "foo b", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo b' and the result returned was "; - return FAIL; - } - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,buf); - - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/testinfo.dat deleted file mode 100644 index 31b0f667b6..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test7/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %c formatter. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/CMakeLists.txt deleted file mode 100644 index 3c4b5ed36e..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test8 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test8 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test8 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/test.c deleted file mode 100644 index 7367461544..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/test.c +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char buf[256]; - -BOOL test1() -{ - int pos = 42; - - /* Test 1 */ - wsprintf(buf, "foo %d", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %ld", 0xFFFF); - if (memcmp(buf, "foo 65535", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is " - "'foo 65535' and the result returned was "; - return FAIL; - } - - /* Test 3 */ - wsprintf(buf, "foo %3d", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 4 */ - wsprintf(buf, "foo %-3d", pos); - if (memcmp(buf, "foo 42 ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo 42 ' and the result returned was "; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %.1d", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %.3d", pos); - if (memcmp(buf, "foo 042", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo 042' and the result returned was "; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %03d", pos); - if (memcmp(buf, "foo 042", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo 042' and the result returned was "; - return FAIL; - } - - /* Test 8 */ - wsprintf(buf, "foo %#d", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,buf); - } - - PAL_Terminate(); - return PASS; - -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/testinfo.dat deleted file mode 100644 index 75f4fbf121..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test8/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %d formatter. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/CMakeLists.txt deleted file mode 100644 index dcbb22ebb5..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfa_test9 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfa_test9 coreclrpal) - -target_link_libraries(paltest_wsprintfa_test9 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/test.c deleted file mode 100644 index 9f123bcc6d..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/test.c +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -char * ErrorMessage; -char buf[256]; - -BOOL test1() -{ - - int pos = 42; - - - /* Test 1 */ - wsprintf(buf, "foo %i", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 2 */ - wsprintf(buf, "foo %li", 0xFFFF); - if (memcmp(buf, "foo 65535", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is " - "'foo 65535' and the result returned was "; - return FAIL; - } - - - /* Test 3 */ - wsprintf(buf, "foo %3i", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 4 */ - wsprintf(buf, "foo %-3i", pos); - if (memcmp(buf, "foo 42 ", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is " - "'foo 42 ' and the result returned was "; - return FAIL; - } - - /* Test 5 */ - wsprintf(buf, "foo %.1i", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - /* Test 6 */ - wsprintf(buf, "foo %.3i", pos); - if (memcmp(buf, "foo 042", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is " - "'foo 042' and the result returned was "; - return FAIL; - } - - /* Test 7 */ - wsprintf(buf, "foo %03i", pos); - if (memcmp(buf, "foo 042", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is " - "'foo 042' and the result returned was "; - return FAIL; - } - - /* Test 8 */ - wsprintf(buf, "foo %#i", pos); - if (memcmp(buf, "foo 42", strlen(buf) + 1) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is " - "'foo 42' and the result returned was "; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,buf); - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/testinfo.dat deleted file mode 100644 index 2a3689e4dd..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfA/test9/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfA -Name = Positive test of wsprintfA -TYPE = DEFAULT -EXE1 = test -Description -= Test the %i formatter. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/CMakeLists.txt deleted file mode 100644 index f40d4151d6..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) -add_subdirectory(test11) -add_subdirectory(test12) -add_subdirectory(test13) -add_subdirectory(test2) -add_subdirectory(test3) -add_subdirectory(test6) -add_subdirectory(test7) -add_subdirectory(test8) -add_subdirectory(test9) - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/CMakeLists.txt deleted file mode 100644 index b1c0fb3d0b..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test1 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test1 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/test.c deleted file mode 100644 index 700cb134bd..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/test.c +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ - -#define UNICODE -#include <palsuite.h> - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - - -BOOL test1() -{ - char checkstr[] = "hello world"; - - WCHAR buf[256]; - - /* Test a simple string */ - wsprintf(buf, convert("hello world")); - - /* Error message */ - ErrorMessage = "ERROR: (Test 1) Failed on 'hello world' test. " - "The correct string is 'hello world' and the result returned was "; - BadResult = buf; - - return (memcmp(convert(checkstr), buf, wcslen(buf)*2+2) != 0); -} - -int __cdecl main(int argc, char *argv[]) { - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/testinfo.dat deleted file mode 100644 index f36aced027..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test1/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test the very basic functionality of wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/CMakeLists.txt deleted file mode 100644 index a5d73ed413..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test11 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test11 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test11 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/test.c deleted file mode 100644 index dc1e7a7758..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/test.c +++ /dev/null @@ -1,139 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ - -#define UNICODE -#include <palsuite.h> - - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - - -BOOL test1() -{ - - int pos = 42; - - wsprintf(buf, convert("foo %u"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %lu"), 0xFFFF); - if (memcmp(buf, convert("foo 65535"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is" - " 'foo 65535' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %hu"), 0xFFFF); - if (memcmp(buf, convert("foo 65535"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is" - " 'foo 65535' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %3u"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %-3u"), pos); - if (memcmp(buf, convert("foo 42 "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo 42 ' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.1u"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.3u"), pos); - if (memcmp(buf, convert("foo 042"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is" - " 'foo 042' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %03u"), pos); - if (memcmp(buf, convert("foo 042"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is" - " 'foo 042' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %#u"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 9) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/testinfo.dat deleted file mode 100644 index bb85d63f1b..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test11/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %u formatter with wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/CMakeLists.txt deleted file mode 100644 index 3811fb07c9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test12 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test12 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test12 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/test.c deleted file mode 100644 index 6ba456b3bc..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/test.c +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ - -#define UNICODE -#include <palsuite.h> - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -BOOL test1() -{ - int pos = 0x1234ab; - - wsprintf(buf, convert("foo %x"), pos); - if (memcmp(buf, convert("foo 1234ab"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is" - " 'foo 1234ab' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %lx"), pos); - if (memcmp(buf, convert("foo 1234ab"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is" - " 'foo 1234ab' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %7x"), pos); - if (memcmp(buf, convert("foo 1234ab"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is" - " 'foo 1234ab' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %-7x"), pos); - if (memcmp(buf, convert("foo 1234ab "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is" - " 'foo 1234ab ' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.1x"), pos); - if (memcmp(buf, convert("foo 1234ab"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo 1234ab' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.7x"), pos); - if (memcmp(buf, convert("foo 01234ab"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo 01234ab' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %07x"), pos); - if (memcmp(buf, convert("foo 01234ab"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is" - " 'foo 01234ab' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %#x"), pos); - if (memcmp(buf, convert("foo 0x1234ab"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is" - " 'foo 0x1234ab' and the result returned was "; - BadResult = buf; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/testinfo.dat deleted file mode 100644 index 0d38a20bcc..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test12/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %x formatter with wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/CMakeLists.txt deleted file mode 100644 index 617abb854c..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test13 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test13 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test13 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/test.c deleted file mode 100644 index dd0daae0a0..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/test.c +++ /dev/null @@ -1,126 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ - -#define UNICODE -#include <palsuite.h> - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -BOOL test1() -{ - int pos = 0x1234ab; - - wsprintf(buf, convert("foo %X"), pos); - if (memcmp(buf, convert("foo 1234AB"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is" - " 'foo 1234AB' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %lX"), pos); - if (memcmp(buf, convert("foo 1234AB"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is" - " 'foo 1234AB' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %7X"), pos); - if (memcmp(buf, convert("foo 1234AB"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is" - " 'foo 1234AB' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %-7X"), pos); - if (memcmp(buf, convert("foo 1234AB "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is" - " 'foo 1234AB ' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.1X"), pos); - if (memcmp(buf, convert("foo 1234AB"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo 1234AB' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.7X"), pos); - if (memcmp(buf, convert("foo 01234AB"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo 01234AB' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %07X"), pos); - if (memcmp(buf, convert("foo 01234AB"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is" - " 'foo 01234AB' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %#X"), pos); - if (memcmp(buf, convert("foo 0X1234AB"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is" - " 'foo 0X1234AB' and the result returned was "; - BadResult = buf; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/testinfo.dat deleted file mode 100644 index c16a43f7b7..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test13/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %X formatter with wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/CMakeLists.txt deleted file mode 100644 index 00b26da2e6..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test2 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test2 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test2 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/test.c deleted file mode 100644 index f25ab6c2f4..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/test.c +++ /dev/null @@ -1,108 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ -#define UNICODE -#include <palsuite.h> - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - - -BOOL test1() -{ - - wsprintf(buf, convert("foo %s"), convert("bar")); - if (memcmp(buf, convert("foo bar"), wcslen(buf)*2+2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is 'foo bar'" - " and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %ls"), convert("bar")); - if (memcmp(buf, convert("foo bar"), wcslen(buf)*2 + 2) != 0){ - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is 'foo bar'" - " and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %5s"), convert("bar")); - if (memcmp(buf, convert("foo bar"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is" - " 'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - wsprintf(buf, convert("foo %.2s"), convert("bar")); - if (memcmp(buf, convert("foo ba"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is 'foo ba'" - " and the result returned was "; - BadResult = buf; - return FAIL; - } - wsprintf(buf, convert("foo %5.2s"), convert("bar")); - if (memcmp(buf, convert("foo ba"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo ba' and the result returned was "; - BadResult = buf; - return FAIL; - } - wsprintf(buf, convert("foo %-5s"), convert("bar")); - if (memcmp(buf, convert("foo bar "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo bar ' and the result returned was "; - BadResult = buf; - return FAIL; - } - wsprintf(buf, convert("foo %05s"), convert("bar")); - if (memcmp(buf, convert("foo 00bar"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is" - " 'foo 00bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - } - - PAL_Terminate(); - return PASS; - -} diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/testinfo.dat deleted file mode 100644 index a2a7bb2d39..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test2/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %s formatter with wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/CMakeLists.txt deleted file mode 100644 index 25c6185d12..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test3 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test3 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test3 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/test.c deleted file mode 100644 index a52d617e47..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/test.c +++ /dev/null @@ -1,127 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ -#define UNICODE -#include <palsuite.h> - - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - - -BOOL test1() -{ - - wsprintf(buf, convert("foo %S"), "bar"); - if (memcmp(buf, convert("foo bar"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is" - " 'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %hS"), "bar"); - if (memcmp(buf, convert("foo bar"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is" - " 'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %lS"), convert("bar")); - if (memcmp(buf, convert("foo bar"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is" - " 'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %5S"), "bar"); - if (memcmp(buf, convert("foo bar"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is" - " 'foo bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.2S"), "bar"); - if (memcmp(buf, convert("foo ba"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo ba' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %5.2S"), "bar"); - if (memcmp(buf, convert("foo ba"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo ba' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %-5S"), "bar"); - if (memcmp(buf, convert("foo bar "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is" - " 'foo bar ' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %05S"), "bar"); - if (memcmp(buf, convert("foo 00bar"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is" - " 'foo 00bar' and the result returned was "; - BadResult = buf; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/testinfo.dat deleted file mode 100644 index 46b7b7459d..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test3/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %S formatter with wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/CMakeLists.txt deleted file mode 100644 index c63a4d5c82..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test6 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test6 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test6 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/test.c deleted file mode 100644 index 513f1f7941..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/test.c +++ /dev/null @@ -1,115 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ -#define UNICODE -#include <palsuite.h> - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - -BOOL test1() -{ - WCHAR wc = 'b'; - - wsprintf(buf, convert("foo %c"), wc); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is" - " 'foo b' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %hc"), wc); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is 'foo b'" - " and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %lc"), wc); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is 'foo b'" - " and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %5c"), wc); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is" - " 'foo b' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %-5c"), wc); - if (memcmp(buf, convert("foo b "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo b ' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %05c"), wc); - if (memcmp(buf, convert("foo 0000b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo 0000b' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %#c"), wc); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is 'foo b'" - " and the result returned was "; - BadResult = buf; - return FAIL; - } - return PASS; -} -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/testinfo.dat deleted file mode 100644 index 627b76f602..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test6/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %c formatter with wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/CMakeLists.txt deleted file mode 100644 index 25e43107ff..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test7 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test7 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test7 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/test.c deleted file mode 100644 index 99e73b13ce..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/test.c +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ -#define UNICODE -#include <palsuite.h> - - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - - -BOOL test1() -{ - WCHAR wb = 'b'; - - wsprintf(buf, convert("foo %C"), 'b'); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is" - " 'foo b' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %hC"), 'b'); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is" - " 'foo b' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %lC"), wb); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is" - " 'foo b' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %5C"), 'b'); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is" - " 'foo b' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %-5C"), 'b'); - if (memcmp(buf, convert("foo b "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo b ' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %05C"), 'b'); - if (memcmp(buf, convert("foo 0000b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo 0000b' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %#C"), 'b'); - if (memcmp(buf, convert("foo b"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is" - " 'foo b' and the result returned was "; - BadResult = buf; - return FAIL; - } - return PASS; -} -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/testinfo.dat deleted file mode 100644 index ffcb47a37f..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test7/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %C formatter with wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/CMakeLists.txt deleted file mode 100644 index a6478a2af0..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test8 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test8 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test8 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/test.c deleted file mode 100644 index 63c296eb22..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/test.c +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ -#define UNICODE -#include <palsuite.h> - - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - - -BOOL test1() -{ - int pos = 42; - - wsprintf(buf, convert("foo %d"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %ld"), 0xFFFF); - if (memcmp(buf, convert("foo 65535"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is" - " 'foo 65535' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %3d"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %-3d"), pos); - if (memcmp(buf, convert("foo 42 "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is" - " 'foo 42 ' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.1d"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.3d"), pos); - if (memcmp(buf, convert("foo 042"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo 042' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %03d"), pos); - if (memcmp(buf, convert("foo 042"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is" - " 'foo 042' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %#d"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - return PASS; -} -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/testinfo.dat deleted file mode 100644 index 4238671918..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test8/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %d formatter with wsprintfW. - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/CMakeLists.txt deleted file mode 100644 index e09867b1a7..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.c -) - -add_executable(paltest_wsprintfw_test9 - ${SOURCES} -) - -add_dependencies(paltest_wsprintfw_test9 coreclrpal) - -target_link_libraries(paltest_wsprintfw_test9 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/test.c b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/test.c deleted file mode 100644 index 0a49d9c2c5..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/test.c +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source: test.c -** -** Purpose: Test for wsprintfW() function -** -** -**=========================================================*/ - -#define UNICODE -#include <palsuite.h> - - -char * ErrorMessage = NULL; -WCHAR * BadResult = NULL; -WCHAR buf[256]; - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with strlen */ - - -BOOL test1() -{ - int pos = 42; - - wsprintf(buf, convert("foo %i"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 1) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %li"), 0xFFFF); - if (memcmp(buf, convert("foo 65535"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 2) Failed. The correct string is" - " 'foo 65535' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %3i"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 3) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %-3i"), pos); - if (memcmp(buf, convert("foo 42 "), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 4) Failed. The correct string is" - " 'foo 42 ' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.1i"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 5) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %.3i"), pos); - if (memcmp(buf, convert("foo 042"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 6) Failed. The correct string is" - " 'foo 042' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %03i"), pos); - if (memcmp(buf, convert("foo 042"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 7) Failed. The correct string is" - " 'foo 042' and the result returned was "; - BadResult = buf; - return FAIL; - } - - wsprintf(buf, convert("foo %#i"), pos); - if (memcmp(buf, convert("foo 42"), wcslen(buf)*2 + 2) != 0) - { - ErrorMessage = "ERROR: (Test 8) Failed. The correct string is" - " 'foo 42' and the result returned was "; - BadResult = buf; - return FAIL; - } - - return PASS; -} - -int __cdecl main(int argc, char *argv[]) -{ - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if(test1()) - { - Fail("%s '%s'\n",ErrorMessage,convertC(BadResult)); - - } - - PAL_Terminate(); - return PASS; - -} - - diff --git a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/testinfo.dat deleted file mode 100644 index 3006aa87bc..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/wsprintfW/test9/testinfo.dat +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = wsprintfW -Name = Positive test of wsprintfW -TYPE = DEFAULT -EXE1 = test -Description -= Test %i formatter with wsprintfW. - - |