diff options
author | Rahul Kumar <rahku@microsoft.com> | 2017-03-29 15:31:29 -0700 |
---|---|---|
committer | Rahul Kumar <rahku@microsoft.com> | 2017-03-31 14:32:33 -0700 |
commit | 201c70cc49ff2027fb8ed0ba5e25f56534b04a96 (patch) | |
tree | 1e223c126c1a5c4819b6aa37492003aabd581d8d /src/pal/tests | |
parent | 07fa3a32336d2da5d2bf652ad01d33f18b2debaf (diff) | |
download | coreclr-201c70cc49ff2027fb8ed0ba5e25f56534b04a96.tar.gz coreclr-201c70cc49ff2027fb8ed0ba5e25f56534b04a96.tar.bz2 coreclr-201c70cc49ff2027fb8ed0ba5e25f56534b04a96.zip |
1. Remove disable of C4996
2. delete some dead code
3. Remove implementation of GetOSVersion and hardcode OS version to be 0.0.0
4. Add implementation of IsWindows8OrAbove & IsWinrtSupported (donno why this was deleted earlier)
5. remove GetVersionEx from PAL
Diffstat (limited to 'src/pal/tests')
9 files changed, 0 insertions, 247 deletions
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/CMakeLists.txt deleted file mode 100644 index f6aa0cb2d9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/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/GetVersionExA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt deleted file mode 100644 index 1e512f3c2f..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.cpp -) - -add_executable(paltest_getversionexa_test1 - ${SOURCES} -) - -add_dependencies(paltest_getversionexa_test1 coreclrpal) - -target_link_libraries(paltest_getversionexa_test1 - ${COMMON_TEST_LIBRARIES} -) diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.cpp b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.cpp deleted file mode 100644 index 5dd20c6576..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.cpp +++ /dev/null @@ -1,83 +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 GetVersionExA() function -** -** -**=========================================================*/ - -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) { - - OSVERSIONINFO TheVersionInfo; - OSVERSIONINFO* pVersionInfo = &TheVersionInfo; - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - - /* This needs to be done before using GetVersionEx */ - pVersionInfo->dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - - /* If GetVersionEx fails, then the test fails */ - if(GetVersionEx(pVersionInfo) == 0) - { - Fail("ERROR: The GetVersionEx function returned 0, which indicates " - "failure."); - } - - /* These values are fixed, ensure they're set properly */ - if(pVersionInfo->dwMajorVersion != 5) - { - Fail("ERROR: The fixed value of dwMajorVersion shoud be 5, " - "but is really %d.",pVersionInfo->dwMajorVersion); - } - - /* The minor version values for Win2k and XP are different - for Win2k minor version equals 0 and for XP minor version - equals 1. Both values are excepted here. */ - if((pVersionInfo->dwMinorVersion != 0) && - (pVersionInfo->dwMinorVersion != 1)) - { - Fail("ERROR: The fixed value of dwMinorVersion shoud be 0 or 1, " - "but is really %d.",pVersionInfo->dwMinorVersion); - } - if(pVersionInfo->dwBuildNumber_PAL_Undefined < 0) - { - Fail("ERROR: The value of dwBuildNumber shoud be at least 0, but " - "is really %d.",pVersionInfo->dwBuildNumber_PAL_Undefined); - } - -#if !WIN32 - /* Under BSD, the PlatformID should be UNIX and the Service Pack - version should be set to "". - */ - - if(pVersionInfo->dwPlatformId != VER_PLATFORM_UNIX || - pVersionInfo->szCSDVersion_PAL_Undefined[0] != 0) - { - Fail("ERROR: The dwPlatformId should be %d but is really %d. And the " - "szCSDVerion should be NULL.", - VER_PLATFORM_UNIX,pVersionInfo->dwPlatformId); - } -#endif - - - PAL_Terminate(); - return PASS; -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/testinfo.dat deleted file mode 100644 index 1e9c570c60..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/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 = GetVersionExA -Name = Positive Test for GetVersionExA -TYPE = DEFAULT -EXE1 = test -Description -= Test that all the values in the OSVERSION structure are set properly -= for the current environment. - - - diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/CMakeLists.txt deleted file mode 100644 index f6aa0cb2d9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/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/GetVersionExW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt deleted file mode 100644 index 4ef820c479..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.cpp -) - -add_executable(paltest_getversionexw_test1 - ${SOURCES} -) - -add_dependencies(paltest_getversionexw_test1 coreclrpal) - -target_link_libraries(paltest_getversionexw_test1 - ${COMMON_TEST_LIBRARIES} -) diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.cpp b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.cpp deleted file mode 100644 index 69aae54bcf..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.cpp +++ /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 : test.c -** -** Purpose: Test for GetVersionExW() function -** -** -**=========================================================*/ - -#define UNICODE - -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) -{ - - OSVERSIONINFO TheVersionInfo; - OSVERSIONINFO* pVersionInfo = &TheVersionInfo; - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - /* This needs to be done before using GetVersionEx */ - pVersionInfo->dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - - /* If GetVersionEx fails, then the test fails */ - if(GetVersionEx(pVersionInfo) == 0) - { - Fail("ERROR: The GetVersionEx function returned 0, which indicates " - "failure."); - } - - /* These values are fixed, ensure they're set properly */ - if(pVersionInfo->dwMajorVersion != 5) - { - Fail("ERROR: The fixed value of dwMajorVersion shoud be 5, but is " - " really %d.",pVersionInfo->dwMajorVersion); - } - - /* The minor version values for Win2k and XP are different - for Win2k minor version equals 0 and for XP minor version - equals 1. Both values are excepted here. */ - if((pVersionInfo->dwMinorVersion != 0) && - (pVersionInfo->dwMinorVersion != 1)) - { - Fail("ERROR: The fixed value of dwMinorVersion shoud be 0 or 1, " - "but is really %d.",pVersionInfo->dwMinorVersion); - } - - if(pVersionInfo->dwBuildNumber_PAL_Undefined < 0) - { - Fail("ERROR: The value of dwBuildNumber shoud be at least 0, but is " - "really %d.",pVersionInfo->dwBuildNumber_PAL_Undefined); - } - -#if !WIN32 - - - /* Under BSD, the PlatformID should be UNIX and the Service Pack - version should be set to "". - */ - - if(pVersionInfo->dwPlatformId != VER_PLATFORM_UNIX || - pVersionInfo->szCSDVersion_PAL_Undefined[0] != 0) - { - Fail("ERROR: The dwPlatformId should be %d but is really %d. And the " - "szCSDVerion should be NULL.",VER_PLATFORM_UNIX, - pVersionInfo->dwPlatformId); - } -#endif - - - PAL_Terminate(); - return PASS; -} - - - diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/testinfo.dat deleted file mode 100644 index 7773245b3f..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/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 = GetVersionExW -Name = Positive Test for GetVersionExW -TYPE = DEFAULT -EXE1 = test -Description -= Test that all the values in the OSVERSION structure are set properly -= for the current environment. - - - diff --git a/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt b/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt index f7a293a69c..3f9469d254 100644 --- a/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt +++ b/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt @@ -144,8 +144,6 @@ miscellaneous/GetDateFormatW/GetDateFormatW_neg1/paltest_getdateformatw_getdatef miscellaneous/GetDateFormatW/GetDateFormatW_neg2/paltest_getdateformatw_getdateformatw_neg2 miscellaneous/GetDateFormatW/test1/paltest_getdateformatw_test1 miscellaneous/GetUserNameW/test1/paltest_getusernamew_test1 -miscellaneous/GetVersionExA/test1/paltest_getversionexa_test1 -miscellaneous/GetVersionExW/test1/paltest_getversionexw_test1 miscellaneous/InterLockedExchangeAdd/test1/paltest_interlockedexchangeadd_test1 miscellaneous/IsBadCodePtr/test1/paltest_isbadcodeptr_test1 miscellaneous/IsBadReadPtr/test1/paltest_isbadreadptr_test1 |