summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/miscellaneous/_ui64tow/test1
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/miscellaneous/_ui64tow/test1')
-rw-r--r--src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/CMakeLists.txt19
-rw-r--r--src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/_ui64tow.c101
-rw-r--r--src/pal/tests/palsuite/miscellaneous/_ui64tow/test1/testinfo.dat12
3 files changed, 0 insertions, 132 deletions
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