diff options
Diffstat (limited to 'src/pal/tests/palsuite/c_runtime/_vsnwprintf/test1')
3 files changed, 0 insertions, 93 deletions
diff --git a/src/pal/tests/palsuite/c_runtime/_vsnwprintf/test1/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/_vsnwprintf/test1/CMakeLists.txt deleted file mode 100644 index 52c442d572..0000000000 --- a/src/pal/tests/palsuite/c_runtime/_vsnwprintf/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 - test1.c -) - -add_executable(paltest_vsnwprintf_test1 - ${SOURCES} -) - -add_dependencies(paltest_vsnwprintf_test1 coreclrpal) - -target_link_libraries(paltest_vsnwprintf_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/_vsnwprintf/test1/test1.c b/src/pal/tests/palsuite/c_runtime/_vsnwprintf/test1/test1.c deleted file mode 100644 index 0238e42611..0000000000 --- a/src/pal/tests/palsuite/c_runtime/_vsnwprintf/test1/test1.c +++ /dev/null @@ -1,60 +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: test1.c -** -** Purpose: Test #1 for the _vsnwprintf function. -** -** -**===================================================================*/ - -#include <palsuite.h> -#include "../_vsnwprintf.h" - -/* memcmp is used to verify the results, so this test is dependent on it. */ -/* ditto with wcslen */ - - -int __cdecl main(int argc, char *argv[]) -{ - WCHAR *checkstr; - WCHAR buf[256] = { 0 }; - int ret; - - if (PAL_Initialize(argc, argv) != 0) - { - return(FAIL); - } - - checkstr = convert("hello world"); - TestVsnwprintf(buf, 256, checkstr); - if (memcmp(checkstr, buf, wcslen(checkstr)*2+2) != 0) - { - Fail("ERROR: Expected \"%s\", got \"%s\"\n", - convertC(checkstr), convertC(buf)); - } - - TestVsnwprintf(buf, 256, convert("xxxxxxxxxxxxxxxxx")); - ret = TestVsnwprintf(buf, 8, checkstr); - if (memcmp(checkstr, buf, 16) != 0) - { - Fail("ERROR: Expected \"%8s\", got \"%8s\"\n", - convertC(checkstr), convertC(buf)); - } - if (ret >= 0) - { - Fail("ERROR: Expected negative return value, got %d.\n", ret); - } - if (buf[8] != (WCHAR) 'x') - { - Fail("ERROR: buffer overflow using \"%s\" with length 8.\n", - convertC(checkstr)); - } - - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/_vsnwprintf/test1/testinfo.dat b/src/pal/tests/palsuite/c_runtime/_vsnwprintf/test1/testinfo.dat deleted file mode 100644 index d806fb8ed8..0000000000 --- a/src/pal/tests/palsuite/c_runtime/_vsnwprintf/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 = C Runtime -Function = _vsnwprintf -Name = Positive Test for _vsnwprintf -TYPE = DEFAULT -EXE1 = test1 -Description -= Tests the PAL implementation of the _vsnwprintf function. -= General test to see if _vsnwprintf works correctly. -= This test is modeled after _snwprintf. |