diff options
Diffstat (limited to 'src/pal/tests/palsuite/miscellaneous/_i64tow')
-rw-r--r-- | src/pal/tests/palsuite/miscellaneous/_i64tow/test1/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.cpp (renamed from src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.c) | 12 | ||||
-rw-r--r-- | src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat | 6 |
3 files changed, 10 insertions, 10 deletions
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. |