languages (code pages). Currently only U.S. English (tested by -
test1) is supported.
-miscellaneous/getcalendarinfow/test2:
-=======================================
-Currently the only calendars that are supported are CAL_GREGORIAN
-and CAL_GREGORIAN_US, which are tested by test1. This test will
-be useful when full calendar support is implemented.
-
-miscellaneous/getdateformatw/test1:
-===================================
-Currently the only calendars that are supported are CAL_GREGORIAN
-and CAL_GREGORIAN_US. The GetDateFormatW function will only be
-called when the calendar is CAL_TAIWAN. Since this calendar is not
-currently supported in this release of the PAL, the GetDateFormatW
-function is not implemented except to return an error. This test
-will be useful when full calendar support is implemented.
-
-miscellaneous/getdateformatw/getdateformatw_neg1:
-================================================
-Currently the only calendars that are supported are CAL_GREGORIAN
-and CAL_GREGORIAN_US. The GetDateFormatW function will only be
-called when the calendar is CAL_TAIWAN. Since this calendar is not
-currently supported in this release of the PAL, the GetDateFormatW
-function is not implemented except to return an error. This test
-will be useful when full calendar support is implemented.
-
-miscellaneous/getdateformatw/getdateformatw_neg2:
-================================================
-Currently the only calendars that are supported are CAL_GREGORIAN
-and CAL_GREGORIAN_US. The GetDateFormatW function will only be
-called when the calendar is CAL_TAIWAN. Since this calendar is not
-currently supported in this release of the PAL, the GetDateFormatW
-function is not implemented except to return an error. This test
-will be useful when full calendar support is implemented.
-
-
pal_specific/pal_get_stdin/test1 :
=======================================
This test case should be run manually. Requires user input.
+++ /dev/null
-cmake_minimum_required(VERSION 2.8.12.2)
-
-add_subdirectory(test1)
-add_subdirectory(test2)
-
+++ /dev/null
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- GetCalendarInfoW.cpp
-)
-
-add_executable(paltest_getcalendarinfow_test1
- ${SOURCES}
-)
-
-add_dependencies(paltest_getcalendarinfow_test1 coreclrpal)
-
-target_link_libraries(paltest_getcalendarinfow_test1
- ${COMMON_TEST_LIBRARIES}
-)
+++ /dev/null
-// 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: GetCalendarInfoW.c
-**
-** Purpose: Positive test the GetCalendarInfoW API.
-** Call GetCalendarInfoW to retrieve the information of a
-** calendar
-**
-**
-**============================================================*/
-#define UNICODE
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[])
-{
- int err;
- LCID Locale = LOCALE_USER_DEFAULT;
- CALTYPE CalType = CAL_ITWODIGITYEARMAX|CAL_RETURN_NUMBER;
- DWORD dwValue;
-
- /*Initialize the PAL environment*/
- err = PAL_Initialize(argc, argv);
- if(0 != err)
- {
- return FAIL;
- }
-
- err = GetCalendarInfoW(Locale,/*locale idendifier*/
- CAL_GREGORIAN, /*calendar identifier*/
- CalType, /*calendar tyope*/
- NULL, /*buffer to store the retrieve info*/
- 0, /*alwayse zero*/
- &dwValue);/*to store the requrest data*/
- if (0 == err)
- {
- Fail("GetCalendarInfoW failed for CAL_GREGORIAN!\n");
- }
-
- err = GetCalendarInfoW(Locale,/*locale idendifier*/
- CAL_GREGORIAN_US, /*calendar identifier*/
- CalType, /*calendar tyope*/
- NULL, /*buffer to store the retreive info*/
- 0, /*alwayse zero*/
- &dwValue);/*to store the requrest data*/
- if (0 == err)
- {
- Fail("GetCalendarInfoW failed for CAL_GREGORIAN_US!\n");
- }
-
-
- PAL_Terminate();
- return PASS;
-}
+++ /dev/null
-# 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 = GetCalendarInfoW
-Name = Positive test for GetCalendarInfoW API to retrieve the info of a calendar
-TYPE = DEFAULT
-EXE1 = getcalendarinfow
-Description
-= Test the GetCalendarInfoW to retrieve the information of a calendar
-= This test for US English
-
+++ /dev/null
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- GetCalendarInfoW.cpp
-)
-
-add_executable(paltest_getcalendarinfow_test2
- ${SOURCES}
-)
-
-add_dependencies(paltest_getcalendarinfow_test2 coreclrpal)
-
-target_link_libraries(paltest_getcalendarinfow_test2
- ${COMMON_TEST_LIBRARIES}
-)
+++ /dev/null
-// 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: GetCalendarInfoW.c
-**
-** Purpose: Positive test the GetCalendarInfoW API.
-** Call GetCalendarInfoW to retrieve the information of all
-** calendars
-**
-**
-**============================================================*/
-#define UNICODE
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[])
-{
- int err;
- int index = 0;
- LCID Locale = LOCALE_USER_DEFAULT;
- CALID Calendar;
- CALTYPE CalType = CAL_ITWODIGITYEARMAX|CAL_RETURN_NUMBER;
- DWORD dwValue;
- char *CalendarID[]={"CAL_GREGORIAN",
- "CAL_GREGORIAN_US",
- "CAL_JAPAN",
- "CAL_TAIWAN",
- "CAL_KOREA",
- "CAL_HIJRI",
- "CAL_THAI",
- "CAL_HEBREW",
- "CAL_GREGORIAN_ME_FRENCH",
- "CAL_GREGORIAN_ARABIC",
- "CAL_GREGORIAN_XLIT_ENGLISH",
- "CAL_GREGORIAN_XLIT_FRENCH",
- "CAL_JULIAN"};
-
- char errBuffer[1024];
-
-
- /*Initialize the PAL environment*/
- err = PAL_Initialize(argc, argv);
- if(0 != err)
- {
- return FAIL;
- }
-
- memset(errBuffer, 0, 1024);
-
- for(index=0; index<13; index++)
- {
- Calendar = index + 1;
- /*retrieve the specified calendar info*/
- err = GetCalendarInfoW(Locale,/*locale idendifier*/
- Calendar, /*calendar identifier*/
- CalType, /*calendar tyope*/
- NULL, /*buffer to store the retreive info*/
- 0, /*alwayse zero*/
- &dwValue);/*to store the requrest data*/
- if(0 == err)
- {
- strcat(errBuffer, CalendarID[index]);
- strcat(errBuffer, ", ");
- }
- }
-
-
- if(strlen(errBuffer) > 0)
- {
- Fail("\nFailed to call GetCalendarInfoW API by passing %s"
- " Calendar identifier(s)\n",errBuffer);
- }
-
-
- PAL_Terminate();
- return PASS;
-}
+++ /dev/null
-Version = 1.0
-Section = miscellaneous
-Function = GetCalendarInfoW
-Name = Positive test #2 for GetCalendarInfoW API to retrieve the info of a
-calendar
-TYPE = DEFAULT
-EXE1 = getcalendarinfow
-Description
-= Test the GetCalendarInfoW to retrieve the information of all calendars
-= but US English
-
+++ /dev/null
-cmake_minimum_required(VERSION 2.8.12.2)
-
-add_subdirectory(GetDateFormatW_neg1)
-add_subdirectory(GetDateFormatW_neg2)
-add_subdirectory(test1)
-
+++ /dev/null
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- GetDateFormatW_neg.cpp
-)
-
-add_executable(paltest_getdateformatw_getdateformatw_neg1
- ${SOURCES}
-)
-
-add_dependencies(paltest_getdateformatw_getdateformatw_neg1 coreclrpal)
-
-target_link_libraries(paltest_getdateformatw_getdateformatw_neg1
- ${COMMON_TEST_LIBRARIES}
-)
+++ /dev/null
-// 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: GetDateFormatW_neg.c
-**
-** Purpose: Negative test the GetDateFormatW API.
-** Call GetDateFormatW by passing an invalid parameter
-**
-**
-**============================================================*/
-#define UNICODE
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[])
-{
- int err;
- WCHAR *wpFormat;
- LPCSTR lpString = "gg";
- CONST SYSTEMTIME *lpDate = NULL;
- LCID DefaultLocale;
- DWORD dwFlags;
- int DateSize;
- WCHAR *wpBuffer = NULL;
-
- /*Initialize the PAL environment*/
- err = PAL_Initialize(argc, argv);
- if(0 != err)
- {
- return FAIL;
- }
-
- /*convert to a wide character string*/
- wpFormat = convert((char *)lpString);
-
- dwFlags = DATE_USE_ALT_CALENDAR; /*set the flags*/
-
-
- DateSize = 0;
-
- /*retrieve the buffer size*/
- DateSize = GetDateFormatW(
- DefaultLocale, /*system default locale*/
- dwFlags, /*function option*/
- (SYSTEMTIME *)lpDate, /*always is NULL*/
- wpFormat, /*pointer to a picture string*/
- wpBuffer, /*out buffer*/
- DateSize); /*buffer size*/
-
- if(DateSize <= 0)
- {
- free(wpFormat);
- Fail("\nRetrieved an invalid buffer size\n");
- }
-
- wpBuffer = (WCHAR*)malloc((DateSize + 1)*sizeof(WCHAR));
- if(NULL == wpBuffer)
- {
- free(wpFormat);
- Fail("\nFailed to allocate memory to store the formatted string\n");
- }
-
- /*format a date by passing an invalid locale indentifier*/
- err = GetDateFormatW(
- -1, /*invalid locale identifier*/
- dwFlags, /*function option*/
- (SYSTEMTIME *)lpDate, /*always is NULL, or use system date*/
- wpFormat, /*pointer to a picture string*/
- wpBuffer, /*out buffer*/
- DateSize); /*buffer size*/
-
- free(wpBuffer);
- free(wpFormat);
-
- if(0 != err || GetLastError() != ERROR_INVALID_PARAMETER)
- {
- Fail("\nFailed to call GetDateFormatW for a negative test by "
- "passing an invalid parameter, error code=%d\n", GetLastError());
- }
-
- PAL_Terminate();
- return PASS;
-}
+++ /dev/null
-Version = 1.0
-Section = miscellaneous
-Function = GetDateFormatW
-Name = Negative test for GetDateFormatW by passing an invlid locale identifier
-TYPE = DEFAULT
-EXE1 = getdateformatw_neg
-Description
-=negative test GetDateFormatW by passing an invalid locale identifier
+++ /dev/null
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- GetDateFormatW_neg.cpp
-)
-
-add_executable(paltest_getdateformatw_getdateformatw_neg2
- ${SOURCES}
-)
-
-add_dependencies(paltest_getdateformatw_getdateformatw_neg2 coreclrpal)
-
-target_link_libraries(paltest_getdateformatw_getdateformatw_neg2
- ${COMMON_TEST_LIBRARIES}
-)
+++ /dev/null
-// 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: GetDateFormatW_neg.c
-**
-** Purpose: Negative test the GetDateFormatW API.
-** Call GetDateFormatW by passing an invalid flag
-**
-**
-**============================================================*/
-#define UNICODE
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[])
-{
- int err;
- WCHAR *wpFormat;
- LPCSTR lpString = "gg";
- CONST SYSTEMTIME *lpDate = NULL;
- LCID DefaultLocale;
- DWORD dwFlags;
- int DateSize;
- WCHAR *wpBuffer = NULL;
-
- /*Initialize the PAL environment*/
- err = PAL_Initialize(argc, argv);
- if(0 != err)
- {
- return FAIL;
- }
-
- /*convert to a wide character string*/
- wpFormat = convert((char *)lpString);
-
- /*
- DefaultLocale = GetSystemDefaultLCID() which is not defined in PAL;
-
- LOCALE_SYSTEM_DEFAULT = MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)
-
- LANG_SYSTEM_DEFAULT = MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT);
- SUBLANG_SYS_DEFAULT is not defined in PAL, here use hardcoding,
- the value is from winnt.h
- */
-
- DefaultLocale = MAKELCID(MAKELANGID(LANG_NEUTRAL, 0x02), SORT_DEFAULT);
-
- dwFlags = DATE_USE_ALT_CALENDAR; /*set the flags*/
-
-
- DateSize = 0;
-
- /*retrieve the buffer size*/
- DateSize = GetDateFormatW(
- DefaultLocale, /*system default locale*/
- dwFlags, /*function option*/
- (SYSTEMTIME *)lpDate, /*always is NULL*/
- wpFormat, /*pointer to a picture string*/
- wpBuffer, /*out buffer*/
- DateSize); /*buffer size*/
-
- if(DateSize <= 0)
- {
- free(wpFormat);
- Fail("\nRetrieved an invalid buffer size\n");
- }
-
- wpBuffer = (WCHAR*)malloc((DateSize + 1)*sizeof(WCHAR));
- if(NULL == wpBuffer)
- {
- free(wpFormat);
- Fail("\nFailed to allocate memory to store the formatted string\n");
- }
-
- err = GetDateFormatW(
- DefaultLocale, /*system default locale*/
- 0x00000001|0x00000008,/*DATE_SHORTDATE|DATE_YEARMONTH */
- /*an invalid flag*/
- (SYSTEMTIME *)lpDate, /*always is NULL, or use system date*/
- wpFormat, /*pointer to a picture string*/
- wpBuffer, /*out buffer*/
- DateSize); /*buffer size*/
-
- free(wpBuffer);
- free(wpFormat);
-
- if(0 != err || GetLastError() != ERROR_INVALID_FLAGS)
- {
- Fail("\nFailed to call GetDateFormatW for a negative test by "
- "passing an invalid flag, error code=%d\n", GetLastError());
- }
-
-
- PAL_Terminate();
- return PASS;
-}
+++ /dev/null
-Version = 1.0
-Section = miscellaneous
-Function = GetDateFormatW
-Name = Negative test for GetDateFormatW by passing an invalid flag
-TYPE = DEFAULT
-EXE1 = getdateformatw_neg
-Description
-=test for GetDateFormatW by passing an invalid flag which is not
-=supported
+++ /dev/null
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- GetDateFormatW.cpp
-)
-
-add_executable(paltest_getdateformatw_test1
- ${SOURCES}
-)
-
-add_dependencies(paltest_getdateformatw_test1 coreclrpal)
-
-target_link_libraries(paltest_getdateformatw_test1
- ${COMMON_TEST_LIBRARIES}
-)
+++ /dev/null
-// 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: GetDateFormatW.c
-**
-** Purpose: Positive test the GetDateFormatW API.
-** Call GetDateFormatW to format a date string for
-** a specified locale
-**
-**
-**============================================================*/
-#define UNICODE
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[])
-{
- int err;
- WCHAR *wpFormat;
- LPCSTR lpString = "gg";
- CONST SYSTEMTIME *lpDate = NULL;
- LCID DefaultLocale;
- DWORD dwFlags;
- int DateSize;
- WCHAR *wpBuffer = NULL;
-
- /*Initialize the PAL environment*/
- err = PAL_Initialize(argc, argv);
- if(0 != err)
- {
- return FAIL;
- }
-
- /*convert to a wide character string*/
- wpFormat = convert((char *)lpString);
-
- /*
- DefaultLocale = GetSystemDefaultLCID() which is not defined in PAL;
-
- LOCALE_SYSTEM_DEFAULT = MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)
-
- LANG_SYSTEM_DEFAULT = MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT);
- SUBLANG_SYS_DEFAULT is not defined in PAL, here use hardcoding,
- the value is from winnt.h
- */
- DefaultLocale = MAKELCID(MAKELANGID(LANG_NEUTRAL, 0x02), SORT_DEFAULT);
-
- dwFlags = DATE_USE_ALT_CALENDAR; /*set the flags*/
-
-
- DateSize = 0;
-
- /*retrieve the buffer size*/
- DateSize = GetDateFormatW(
- DefaultLocale, /*system default locale*/
- dwFlags, /*function option*/
- (SYSTEMTIME *)lpDate, /*always is NULL*/
- wpFormat, /*pointer to a picture string*/
- wpBuffer, /*out buffer*/
- DateSize); /*buffer size*/
-
- if(DateSize <= 0)
- {
- free(wpFormat);
- Fail("\nRetrieved an invalid buffer size\n");
- }
-
-
- wpBuffer = (WCHAR*)malloc((DateSize+1)*sizeof(WCHAR));
- if(NULL == wpBuffer)
- {
- free(wpFormat);
- Fail("\nFailed to allocate memory to store a formatted string\n");
- }
-
- /*retrieve the formatted string for a specified locale*/
- err = GetDateFormatW(
- DefaultLocale, /*system default locale*/
- dwFlags, /*function option*/
- (SYSTEMTIME *)lpDate, /*always is NULL*/
- wpFormat, /*pointer to a picture string*/
- wpBuffer, /*out buffer*/
- DateSize); /*buffer size*/
-
- if(0 == err)
- {
- free(wpBuffer);
- free(wpFormat);
- Fail("\nFailed to call GetDateFormatW to format a system data "
- "as a data string for system default locale!\n");
- }
-
- free(wpBuffer);
- free(wpFormat);
-
- PAL_Terminate();
- return PASS;
-}
+++ /dev/null
-Version = 1.0
-Section = miscellaneous
-Function = GetDateFormatW
-Name = Positive test for GetDateFormatW to format a date as a date string
-TYPE = DEFAULT
-EXE1 = getdateformatw
-Description
-=test for GetDateFormatW to format a date as a date string
-=for a specified locale
miscellaneous/FormatMessageW/test4/paltest_formatmessagew_test4
miscellaneous/FormatMessageW/test5/paltest_formatmessagew_test5
miscellaneous/FormatMessageW/test6/paltest_formatmessagew_test6
-miscellaneous/GetCalendarInfoW/test1/paltest_getcalendarinfow_test1
-miscellaneous/GetCalendarInfoW/test2/paltest_getcalendarinfow_test2
-miscellaneous/GetDateFormatW/GetDateFormatW_neg1/paltest_getdateformatw_getdateformatw_neg1
-miscellaneous/GetDateFormatW/GetDateFormatW_neg2/paltest_getdateformatw_getdateformatw_neg2
-miscellaneous/GetDateFormatW/test1/paltest_getdateformatw_test1
miscellaneous/InterLockedExchangeAdd/test1/paltest_interlockedexchangeadd_test1
miscellaneous/IsBadCodePtr/test1/paltest_isbadcodeptr_test1
miscellaneous/IsBadReadPtr/test1/paltest_isbadreadptr_test1
miscellaneous/MessageBoxW/test2/paltest_messageboxw_test2
miscellaneous/wsprintfW/test2/paltest_wsprintfw_test2
miscellaneous/wsprintfW/test7/paltest_wsprintfw_test7
-pal_specific/PAL_GetMachineConfigurationDirectoryW/test1/paltest_pal_getmachineconfigurationdirectoryw_test1
pal_specific/PAL_GetPALDirectoryW/test1/paltest_pal_getpaldirectoryw_test1
-pal_specific/PAL_GetUserConfigurationDirectoryW/test1/paltest_pal_getuserconfigurationdirectoryw_test1
pal_specific/PAL_GetUserTempDirectoryW/test1/paltest_pal_getusertempdirectoryw_test1
pal_specific/PAL_get_stderr/test1/paltest_pal_get_stderr_test1
pal_specific/PAL_get_stdin/test1/paltest_pal_get_stdin_test1