diff options
Diffstat (limited to 'src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.c')
-rw-r--r-- | src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.c b/src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.c deleted file mode 100644 index 789eebf5a3..0000000000 --- a/src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.c +++ /dev/null @@ -1,71 +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 to that wcscat correctly concatanates wide strings, including placing -** null pointers. -** -** -**==========================================================================*/ - - - -#include <palsuite.h> - -/* - * Notes: uses memcmp and the (pal) sprintf - */ - -int __cdecl main(int argc, char *argv[]) -{ - WCHAR dest[80]; - WCHAR test[] = {'f','o','o',' ','b','a','r',' ','b','a','z',0}; - WCHAR str1[] = {'f','o','o',' ',0}; - WCHAR str2[] = {'b','a','r',' ',0}; - WCHAR str3[] = {'b','a','z',0}; - WCHAR *ptr; - char buffer[256]; - - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - - dest[0] = 0; - - ptr = wcscat(dest, str1); - if (ptr != dest) - { - Fail("ERROR: Expected wcscat to return ptr to %p, got %p", dest, ptr); - } - - ptr = wcscat(dest, str2); - if (ptr != dest) - { - Fail("ERROR: Expected wcscat to return ptr to %p, got %p", dest, ptr); - } - - ptr = wcscat(dest, str3); - if (ptr != dest) - { - Fail("ERROR: Expected wcscat to return ptr to %p, got %p", dest, ptr); - } - - if (memcmp(dest, test, sizeof(test)) != 0) - { - sprintf(buffer, "%S", dest); - Fail("ERROR: Expected wcscat to give \"%s\", got \"%s\"\n", - "foo bar baz", buffer); - } - - PAL_Terminate(); - return PASS; -} - |