From db20f3f1bb8595633a7e16c8900fd401a453a6b5 Mon Sep 17 00:00:00 2001 From: Jiyoung Yun Date: Tue, 27 Dec 2016 16:46:08 +0900 Subject: Imported Upstream version 1.0.0.9127 --- .../tests/palsuite/c_runtime/sscanf/CMakeLists.txt | 20 -- src/pal/tests/palsuite/c_runtime/sscanf/sscanf.h | 246 --------------------- .../palsuite/c_runtime/sscanf/test1/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test1/test1.c | 53 ----- .../palsuite/c_runtime/sscanf/test1/testinfo.dat | 12 - .../c_runtime/sscanf/test10/CMakeLists.txt | 19 -- .../palsuite/c_runtime/sscanf/test10/test10.c | 37 ---- .../palsuite/c_runtime/sscanf/test10/testinfo.dat | 12 - .../c_runtime/sscanf/test11/CMakeLists.txt | 19 -- .../palsuite/c_runtime/sscanf/test11/test11.c | 36 --- .../palsuite/c_runtime/sscanf/test11/testinfo.dat | 12 - .../c_runtime/sscanf/test12/CMakeLists.txt | 19 -- .../palsuite/c_runtime/sscanf/test12/test12.c | 35 --- .../palsuite/c_runtime/sscanf/test12/testinfo.dat | 12 - .../c_runtime/sscanf/test13/CMakeLists.txt | 19 -- .../palsuite/c_runtime/sscanf/test13/test13.c | 37 ---- .../palsuite/c_runtime/sscanf/test13/testinfo.dat | 12 - .../c_runtime/sscanf/test14/CMakeLists.txt | 19 -- .../palsuite/c_runtime/sscanf/test14/test14.c | 36 --- .../palsuite/c_runtime/sscanf/test14/testinfo.dat | 12 - .../c_runtime/sscanf/test15/CMakeLists.txt | 19 -- .../palsuite/c_runtime/sscanf/test15/test15.c | 36 --- .../palsuite/c_runtime/sscanf/test15/testinfo.dat | 12 - .../c_runtime/sscanf/test16/CMakeLists.txt | 19 -- .../palsuite/c_runtime/sscanf/test16/test16.c | 37 ---- .../palsuite/c_runtime/sscanf/test16/testinfo.dat | 12 - .../c_runtime/sscanf/test17/CMakeLists.txt | 19 -- .../palsuite/c_runtime/sscanf/test17/test17.c | 37 ---- .../palsuite/c_runtime/sscanf/test17/testinfo.dat | 12 - .../palsuite/c_runtime/sscanf/test2/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test2/test2.c | 44 ---- .../palsuite/c_runtime/sscanf/test2/testinfo.dat | 12 - .../palsuite/c_runtime/sscanf/test3/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test3/test3.c | 35 --- .../palsuite/c_runtime/sscanf/test3/testinfo.dat | 12 - .../palsuite/c_runtime/sscanf/test4/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test4/test4.c | 44 ---- .../palsuite/c_runtime/sscanf/test4/testinfo.dat | 12 - .../palsuite/c_runtime/sscanf/test5/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test5/test5.c | 43 ---- .../palsuite/c_runtime/sscanf/test5/testinfo.dat | 12 - .../palsuite/c_runtime/sscanf/test6/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test6/test6.c | 43 ---- .../palsuite/c_runtime/sscanf/test6/testinfo.dat | 12 - .../palsuite/c_runtime/sscanf/test7/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test7/test7.c | 43 ---- .../palsuite/c_runtime/sscanf/test7/testinfo.dat | 12 - .../palsuite/c_runtime/sscanf/test8/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test8/test8.c | 43 ---- .../palsuite/c_runtime/sscanf/test8/testinfo.dat | 12 - .../palsuite/c_runtime/sscanf/test9/CMakeLists.txt | 19 -- .../tests/palsuite/c_runtime/sscanf/test9/test9.c | 38 ---- .../palsuite/c_runtime/sscanf/test9/testinfo.dat | 12 - 53 files changed, 1470 deletions(-) delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/sscanf.h delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test1/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test1/test1.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test1/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test10/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test10/test10.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test10/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test11/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test11/test11.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test11/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test12/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test12/test12.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test12/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test13/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test13/test13.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test13/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test14/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test14/test14.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test14/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test15/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test15/test15.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test15/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test16/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test16/test16.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test16/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test17/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test17/test17.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test17/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test2/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test2/test2.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test2/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test3/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test3/test3.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test3/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test4/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test4/test4.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test4/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test5/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test5/test5.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test5/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test6/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test6/test6.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test6/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test7/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test7/test7.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test7/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test8/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test8/test8.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test8/testinfo.dat delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test9/CMakeLists.txt delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test9/test9.c delete mode 100644 src/pal/tests/palsuite/c_runtime/sscanf/test9/testinfo.dat (limited to 'src/pal/tests/palsuite/c_runtime/sscanf') diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/CMakeLists.txt deleted file mode 100644 index 59f39a5f58..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) -add_subdirectory(test10) -add_subdirectory(test11) -add_subdirectory(test12) -add_subdirectory(test13) -add_subdirectory(test14) -add_subdirectory(test15) -add_subdirectory(test16) -add_subdirectory(test17) -add_subdirectory(test2) -add_subdirectory(test3) -add_subdirectory(test4) -add_subdirectory(test5) -add_subdirectory(test6) -add_subdirectory(test7) -add_subdirectory(test8) -add_subdirectory(test9) - diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/sscanf.h b/src/pal/tests/palsuite/c_runtime/sscanf/sscanf.h deleted file mode 100644 index 675a67aed2..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/sscanf.h +++ /dev/null @@ -1,246 +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: sscanf.h -** -** Purpose: Contains common testing functions for sscanf.h -** -** -**==========================================================================*/ - -#ifndef __SSCANF_H__ -#define __SSCANF_H__ - -void DoVoidTest(char *inputstr, char *formatstr) -{ - char buf[256] = { 0 }; - int i; - int ret; - - ret = sscanf(inputstr, formatstr, buf); - if (ret != 0) - { - Fail("ERROR: Expected sscanf to return 0, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - for (i=0; i<256; i++) - { - if (buf[i] != 0) - { - Fail("ERROR: Parameter unexpectedly modified scanning \"%s\" " - "using \"%s\".\n", inputstr, formatstr); - } - } - -} - -void DoStrTest(char *inputstr, char *formatstr, char *checkstr) -{ - char buf[256] = { 0 }; - int ret; - - ret = sscanf(inputstr, formatstr, buf); - if (ret != 1) - { - Fail("ERROR: Expected sscanf to return 1, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - if (memcmp(checkstr, buf, strlen(checkstr) + 1) != 0) - { - Fail("ERROR: scanned string incorrectly from \"%s\" using \"%s\".\n" - "Expected \"%s\", got \"%s\".\n", inputstr, formatstr, checkstr, - buf); - } - -} - -void DoWStrTest(char *inputstr, char *formatstr, WCHAR *checkstr) -{ - WCHAR buf[256] = { 0 }; - int ret; - - ret = sscanf(inputstr, formatstr, buf); - if (ret != 1) - { - Fail("ERROR: Expected sscanf to return 1, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - if (memcmp(checkstr, buf, wcslen(checkstr)*2 + 2) != 0) - { - Fail("ERROR: scanned wide string incorrectly from \"%s\" using \"%s\".\n" - "Expected \"%s\", got \"%s\".\n", inputstr, formatstr, - convertC(checkstr), convertC(buf)); - } - -} - -void DoNumTest(char *inputstr, char *formatstr, int checknum) -{ - int num; - int ret; - - ret = sscanf(inputstr, formatstr, &num); - if (ret != 1) - { - Fail("ERROR: Expected sscanf to return 1, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - if (checknum != num) - { - Fail("ERROR: scanned number incorrectly from \"%s\" using \"%s\".\n" - "Expected %d, got %d.\n", inputstr, formatstr, checknum, num); - } -} - -void DoShortNumTest(char *inputstr, char *formatstr, short checknum) -{ - short num; - int ret; - - ret = sscanf(inputstr, formatstr, &num); - if (ret != 1) - { - Fail("ERROR: Expected sscanf to return 1, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - if (checknum != num) - { - Fail("ERROR: scanned number incorrectly from \"%s\" using \"%s\".\n" - "Expected %hd, got %hd.\n", inputstr, formatstr, checknum, num); - } -} - -void DoI64NumTest(char *inputstr, char *formatstr, INT64 checknum) -{ - char buf[256]; - char check[256]; - INT64 num; - int ret; - - ret = sscanf(inputstr, formatstr, &num); - if (ret != 1) - { - Fail("ERROR: Expected sscanf to return 1, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - if (checknum != num) - { - sprintf(buf, "%I64d", num); - sprintf(check, "%I64d", checknum); - Fail("ERROR: scanned I64 number incorrectly from \"%s\" using \"%s\".\n" - "Expected %s, got %s.\n", inputstr, formatstr, check, buf); - } -} - -void DoCharTest(char *inputstr, char *formatstr, char* checkchars, int numchars) -{ - char buf[256]; - int ret; - int i; - - for (i=0; i<256; i++) - buf[i] = (char)-1; - - ret = sscanf(inputstr, formatstr, buf); - if (ret != 1) - { - Fail("ERROR: Expected sscanf to return 1, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - if (memcmp(buf, checkchars, numchars) != 0) - { - buf[numchars] = 0; - - Fail("ERROR: scanned character(s) incorrectly from \"%s\" using \"%s\".\n" - "Expected %s, got %s.\n", inputstr, formatstr, checkchars, - buf); - } - - if (buf[numchars] != (char)-1) - { - Fail("ERROR: overflow occurred in scanning character(s) from \"%s\" " - "using \"%s\".\nExpected %d character(s)\n", inputstr, formatstr, - numchars); - } -} - -void DoWCharTest(char *inputstr, char *formatstr, WCHAR* checkchars, int numchars) -{ - WCHAR buf[256]; - int ret; - int i; - - for (i=0; i<256; i++) - buf[i] = (WCHAR)-1; - - ret = sscanf(inputstr, formatstr, buf); - if (ret != 1) - { - Fail("ERROR: Expected sscanf to return 1, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - if (memcmp(buf, checkchars, numchars) != 0) - { - buf[numchars] = 0; - - Fail("ERROR: scanned wide character(s) incorrectly from \"%s\" using \"%s\".\n" - "Expected %s, got %s.\n", inputstr, formatstr, convertC(checkchars), - convertC(buf)); - } - - if (buf[numchars] != (WCHAR)-1) - { - Fail("ERROR: overflow occurred in scanning wide character(s) from \"%s\" " - "using \"%s\".\nExpected %d character(s)\n", inputstr, formatstr, - numchars); - } -} - - -void DoFloatTest(char *inputstr, char *formatstr, float checkval) -{ - char buf[256] = { 0 }; - float val; - int ret; - int i; - - for (i=0; i<256; i++) - buf[i] = (char)-1; - - ret = sscanf(inputstr, formatstr, buf); - val = *(float*)buf; - - if (ret != 1) - { - Fail("ERROR: Expected sscanf to return 1, got %d.\n" - "Using \"%s\" in \"%s\".\n", ret, inputstr, formatstr); - } - - if (val != checkval) - { - Fail("ERROR: scanned float incorrectly from \"%s\" using \"%s\".\n" - "Expected \"%f\", got \"%f\".\n", inputstr, formatstr, checkval, - val); - } - - if (buf[4] != (char)-1) - { - Fail("ERROR: overflow occurred in scanning float from \"%s\" " - "using \"%s\".\n", inputstr, formatstr); - - } -} - - -#endif diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test1/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test1/CMakeLists.txt deleted file mode 100644 index dce6d1de87..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/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_sscanf_test1 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test1 coreclrpal) - -target_link_libraries(paltest_sscanf_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test1/test1.c b/src/pal/tests/palsuite/c_runtime/sscanf/test1/test1.c deleted file mode 100644 index c6f66a1d20..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test1/test1.c +++ /dev/null @@ -1,53 +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: General test of sscanf -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - - -int __cdecl main(int argc, char *argv[]) -{ - int num; - int ret; - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - - DoVoidTest("foo bar", "foo "); - DoVoidTest("foo bar", "baz"); - DoVoidTest("foo bar", "foo %*s"); - - DoStrTest("foo % bar", "foo %% %s", "bar"); - DoStrTest("foo bar baz", "foo %bar %s", "baz"); - - DoVoidTest("foo bar baz", "foo % bar %s"); - DoVoidTest("foo baz bar", "foo% baz %s"); - - ret = sscanf("foo bar baz", "foo bar %n", &num); - if (ret != 0 || num != 8) - { - Fail("ERROR: Got incorrect values in scanning \"%s\" using \"%s\".\n" - "Expected to get a value of %d with return value of %d, " - "got %d with return %d\n", "foo bar baz", "foo bar %n", 8, 0, - num, ret); - - } - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test1/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test1/testinfo.dat deleted file mode 100644 index ef33ba9e13..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test1 -Description -= General test of sscanf diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test10/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test10/CMakeLists.txt deleted file mode 100644 index c27e4ce33a..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test10/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test10.c -) - -add_executable(paltest_sscanf_test10 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test10 coreclrpal) - -target_link_libraries(paltest_sscanf_test10 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test10/test10.c b/src/pal/tests/palsuite/c_runtime/sscanf/test10/test10.c deleted file mode 100644 index aac5be43ae..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test10/test10.c +++ /dev/null @@ -1,37 +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: test10.c -** -** Purpose: Tests sscanf with wide charactersn -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoWCharTest("1234d", "%C", convert("1"), 1); - DoWCharTest("1234d", "%C", convert("1"), 1); - DoWCharTest("abc", "%2C", convert("ab"), 2); - DoWCharTest(" ab", "%C", convert(" "), 1); - DoCharTest("ab", "%hC", "a", 1); - DoWCharTest("ab", "%lC", convert("a"), 1); - DoWCharTest("ab", "%LC", convert("a"), 1); - DoWCharTest("ab", "%I64C", convert("a"), 1); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test10/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test10/testinfo.dat deleted file mode 100644 index 7e854ed235..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test10/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test10 -Description -= Tests sscanf with wide characters diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test11/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test11/CMakeLists.txt deleted file mode 100644 index 7570e990bf..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test11/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test11.c -) - -add_executable(paltest_sscanf_test11 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test11 coreclrpal) - -target_link_libraries(paltest_sscanf_test11 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test11/test11.c b/src/pal/tests/palsuite/c_runtime/sscanf/test11/test11.c deleted file mode 100644 index 0e3db6cca0..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test11/test11.c +++ /dev/null @@ -1,36 +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: test11.c -** -** Purpose: Tests sscanf with strings -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoStrTest("foo bar", "foo %s", "bar"); - DoStrTest("foo bar", "foo %2s", "ba"); - DoStrTest("foo bar", "foo %hs", "bar"); - DoWStrTest("foo bar", "foo %ls", convert("bar")); - DoStrTest("foo bar", "foo %Ls", "bar"); - DoStrTest("foo bar", "foo %I64s", "bar"); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test11/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test11/testinfo.dat deleted file mode 100644 index 60f5cc46a4..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test11/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test11 -Description -= Tests sscanf with strings diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test12/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test12/CMakeLists.txt deleted file mode 100644 index b6509e46d4..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test12/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test12.c -) - -add_executable(paltest_sscanf_test12 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test12 coreclrpal) - -target_link_libraries(paltest_sscanf_test12 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test12/test12.c b/src/pal/tests/palsuite/c_runtime/sscanf/test12/test12.c deleted file mode 100644 index f800e452c0..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test12/test12.c +++ /dev/null @@ -1,35 +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: test12.c -** -** Purpose: Tests sscanf with wide strings -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoWStrTest("foo bar", "foo %S", convert("bar")); - DoWStrTest("foo bar", "foo %2S", convert("ba")); - DoStrTest("foo bar", "foo %hS", "bar"); - DoWStrTest("foo bar", "foo %lS", convert("bar")); - DoWStrTest("foo bar", "foo %LS", convert("bar")); - DoWStrTest("foo bar", "foo %I64S", convert("bar")); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test12/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test12/testinfo.dat deleted file mode 100644 index 3c453bf53a..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test12/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test12 -Description -= Tests sscanf with wide strings diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test13/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test13/CMakeLists.txt deleted file mode 100644 index 6fb4094f00..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test13/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test13.c -) - -add_executable(paltest_sscanf_test13 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test13 coreclrpal) - -target_link_libraries(paltest_sscanf_test13 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test13/test13.c b/src/pal/tests/palsuite/c_runtime/sscanf/test13/test13.c deleted file mode 100644 index 314604e3ac..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test13/test13.c +++ /dev/null @@ -1,37 +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: test13.c -** -** Purpose: Tests sscanf with floats (decimal notation) -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoFloatTest("123.0", "%f", 123.0f); - DoFloatTest("123.0", "%2f", 12.0f); - DoFloatTest("10E1", "%f", 100.0f); - DoFloatTest("-12.01e-2", "%f", -0.1201f); - DoFloatTest("+12.01e-2", "%f", 0.1201f); - DoFloatTest("-12.01e+2", "%f", -1201.0f); - DoFloatTest("+12.01e+2", "%f", 1201.0f); - DoFloatTest("1234567890.0123456789f", "%f", 1234567936); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test13/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test13/testinfo.dat deleted file mode 100644 index 1c4c2fc26e..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test13/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test13 -Description -= Tests sscanf with floats (decimal notation) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test14/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test14/CMakeLists.txt deleted file mode 100644 index 373a75fbda..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test14/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test14.c -) - -add_executable(paltest_sscanf_test14 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test14 coreclrpal) - -target_link_libraries(paltest_sscanf_test14 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test14/test14.c b/src/pal/tests/palsuite/c_runtime/sscanf/test14/test14.c deleted file mode 100644 index d1291a3b65..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test14/test14.c +++ /dev/null @@ -1,36 +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: test14.c -** -** Purpose: Tests sscanf with floats (exponential notation, lowercase) -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoFloatTest("123.0", "%e", 123.0f); - DoFloatTest("123.0", "%2e", 12.0f); - DoFloatTest("10E1", "%e", 100.0f); - DoFloatTest("-12.01e-2", "%e", -0.1201f); - DoFloatTest("+12.01e-2", "%e", 0.1201f); - DoFloatTest("-12.01e+2", "%e", -1201.0f); - DoFloatTest("+12.01e+2", "%e", 1201.0f); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test14/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test14/testinfo.dat deleted file mode 100644 index 97db6e4ffd..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test14/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test14 -Description -= Tests sscanf with floats (exponential notation, lowercase) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test15/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test15/CMakeLists.txt deleted file mode 100644 index d500901782..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test15/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test15.c -) - -add_executable(paltest_sscanf_test15 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test15 coreclrpal) - -target_link_libraries(paltest_sscanf_test15 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test15/test15.c b/src/pal/tests/palsuite/c_runtime/sscanf/test15/test15.c deleted file mode 100644 index fa51467d85..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test15/test15.c +++ /dev/null @@ -1,36 +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: test15.c -** -** Purpose: Tests sscanf with floats (exponential notation, uppercase -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoFloatTest("123.0", "%E", 123.0f); - DoFloatTest("123.0", "%2E", 12.0f); - DoFloatTest("10E1", "%E", 100.0f); - DoFloatTest("-12.01e-2", "%E", -0.1201f); - DoFloatTest("+12.01e-2", "%E", 0.1201f); - DoFloatTest("-12.01e+2", "%E", -1201.0f); - DoFloatTest("+12.01e+2", "%E", 1201.0f); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test15/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test15/testinfo.dat deleted file mode 100644 index 30c2cf4b30..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test15/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test15 -Description -= Tests sscanf with floats (exponential notation, uppercase) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test16/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test16/CMakeLists.txt deleted file mode 100644 index c5e18ec061..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test16/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test16.c -) - -add_executable(paltest_sscanf_test16 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test16 coreclrpal) - -target_link_libraries(paltest_sscanf_test16 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test16/test16.c b/src/pal/tests/palsuite/c_runtime/sscanf/test16/test16.c deleted file mode 100644 index 787b72ed0a..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test16/test16.c +++ /dev/null @@ -1,37 +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: test16.c -** -** Purpose:Tests sscanf with floats (compact notation, lowercase) -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoFloatTest("123.0", "%g", 123.0f); - DoFloatTest("123.0", "%2g", 12.0f); - DoFloatTest("10E1", "%g", 100.0f); - DoFloatTest("-12.01e-2", "%g", -0.1201f); - DoFloatTest("+12.01e-2", "%g", 0.1201f); - DoFloatTest("-12.01e+2", "%g", -1201.0f); - DoFloatTest("+12.01e+2", "%g", 1201.0f); - DoFloatTest("1234567890.0123456789g", "%g", 1234567936); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test16/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test16/testinfo.dat deleted file mode 100644 index 2c1dd42b70..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test16/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test16 -Description -= Tests sscanf with floats (compact notation, lowercase) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test17/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test17/CMakeLists.txt deleted file mode 100644 index 7d908ab832..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test17/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test17.c -) - -add_executable(paltest_sscanf_test17 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test17 coreclrpal) - -target_link_libraries(paltest_sscanf_test17 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test17/test17.c b/src/pal/tests/palsuite/c_runtime/sscanf/test17/test17.c deleted file mode 100644 index c0dfd1699c..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test17/test17.c +++ /dev/null @@ -1,37 +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: test17.c -** -** Purpose: Tests sscanf with floats (compact notation, uppercase) -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoFloatTest("123.0", "%G", 123.0f); - DoFloatTest("123.0", "%2G", 12.0f); - DoFloatTest("10E1", "%G", 100.0f); - DoFloatTest("-12.01e-2", "%G", -0.1201f); - DoFloatTest("+12.01e-2", "%G", 0.1201f); - DoFloatTest("-12.01e+2", "%G", -1201.0f); - DoFloatTest("+12.01e+2", "%G", 1201.0f); - DoFloatTest("1234567890.0123456789G", "%G", 1234567936); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test17/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test17/testinfo.dat deleted file mode 100644 index e23be8541e..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test17/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test17 -Description -= Tests sscanf with floats (compact notation, uppercase) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test2/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test2/CMakeLists.txt deleted file mode 100644 index 571d773a88..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test2/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test2.c -) - -add_executable(paltest_sscanf_test2 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test2 coreclrpal) - -target_link_libraries(paltest_sscanf_test2 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test2/test2.c b/src/pal/tests/palsuite/c_runtime/sscanf/test2/test2.c deleted file mode 100644 index 1221124e3a..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test2/test2.c +++ /dev/null @@ -1,44 +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: test2.c -** -** Purpose: Test to see if sscanf handles whitespace correctly -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - - -/* - * Tests out how it handles whitespace. Seems to accept anything that qualifies - * as isspace (space, tab, vertical tab, line feed, carriage return and form - * feed), even if it says it only wants spaces tabs and newlines. - */ - -int __cdecl main(int argc, char *argv[]) -{ - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoStrTest("foo bar", "foo %s", "bar"); - DoStrTest("foo\tbar", "foo %s", "bar"); - DoStrTest("foo\nbar", "foo %s", "bar"); - DoStrTest("foo\rbar", "foo %s", "bar"); - DoStrTest("foo\vbar", "foo %s", "bar"); - DoStrTest("foo\fbar", "foo %s", "bar"); - DoStrTest("foo \t\n\r\v\fbar", "foo %s", "bar"); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test2/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test2/testinfo.dat deleted file mode 100644 index f5ee4b52d4..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test2/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test2 -Description -= Test to see if sscanf handles whitespace correctly diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test3/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test3/CMakeLists.txt deleted file mode 100644 index ced8d5f8da..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test3/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test3.c -) - -add_executable(paltest_sscanf_test3 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test3 coreclrpal) - -target_link_libraries(paltest_sscanf_test3 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test3/test3.c b/src/pal/tests/palsuite/c_runtime/sscanf/test3/test3.c deleted file mode 100644 index 9d18991070..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test3/test3.c +++ /dev/null @@ -1,35 +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: test3.c -** -** Purpose: Tests sscanf with bracketed set strings -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoStrTest("bar1", "%[a-z]", "bar"); - DoStrTest("bar1", "%[z-a]", "bar"); - DoStrTest("bar1", "%[ab]", "ba"); - DoStrTest("bar1", "%[ar1b]", "bar1"); - DoStrTest("bar1", "%[^4]", "bar1"); - DoStrTest("bar1", "%[^4a]", "b"); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test3/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test3/testinfo.dat deleted file mode 100644 index c38a498225..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test3/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test3 -Description -= Tests sscanf with bracketed set strings diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test4/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test4/CMakeLists.txt deleted file mode 100644 index 3e70d6dae2..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test4/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test4.c -) - -add_executable(paltest_sscanf_test4 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test4 coreclrpal) - -target_link_libraries(paltest_sscanf_test4 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test4/test4.c b/src/pal/tests/palsuite/c_runtime/sscanf/test4/test4.c deleted file mode 100644 index dd0538bcfe..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test4/test4.c +++ /dev/null @@ -1,44 +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: test4.c -** -** Purpose: Tests sscanf with decimal numbers -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - - -int __cdecl main(int argc, char *argv[]) -{ - int n65535 = 65535; /* Walkaround compiler strictness */ - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoNumTest("1234d", "%d", 1234); - DoNumTest("1234d", "%2d", 12); - DoNumTest("-1", "%d", -1); - DoNumTest("0x1234", "%d", 0); - DoNumTest("012", "%d", 12); - DoShortNumTest("-1", "%hd", n65535); - DoShortNumTest("65536", "%hd", 0); - DoNumTest("-1", "%ld", -1); - DoNumTest("65536", "%ld", 65536); - DoNumTest("-1", "%Ld", -1); - DoNumTest("65536", "%Ld", 65536); - DoI64NumTest("4294967296", "%I64d", I64(4294967296)); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test4/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test4/testinfo.dat deleted file mode 100644 index 868056a6a5..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test4/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test4 -Description -= Tests sscanf with decimal numbers diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test5/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test5/CMakeLists.txt deleted file mode 100644 index 391e51baa2..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test5/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test5.c -) - -add_executable(paltest_sscanf_test5 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test5 coreclrpal) - -target_link_libraries(paltest_sscanf_test5 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test5/test5.c b/src/pal/tests/palsuite/c_runtime/sscanf/test5/test5.c deleted file mode 100644 index 0d45248af3..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test5/test5.c +++ /dev/null @@ -1,43 +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: test5.c -** -** Purpose: Tests sscanf with integer numbers -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - int n65535 = 65535; /* Walkaround compiler strictness */ - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoNumTest("1234d", "%i", 1234); - DoNumTest("1234d", "%2i", 12); - DoNumTest("-1", "%i", -1); - DoNumTest("0x1234", "%i", 0x1234); - DoNumTest("012", "%i", 10); - DoShortNumTest("-1", "%hi", n65535); - DoShortNumTest("65536", "%hi", 0); - DoNumTest("-1", "%li", -1); - DoNumTest("65536", "%li", 65536); - DoNumTest("-1", "%Li", -1); - DoNumTest("65536", "%Li", 65536); - DoI64NumTest("4294967296", "%I64i", I64(4294967296)); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test5/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test5/testinfo.dat deleted file mode 100644 index 8678dc8f5a..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test5/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test5 -Description -= Tests sscanf with integer numbers diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test6/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test6/CMakeLists.txt deleted file mode 100644 index c0b21bfd0d..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test6/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test6.c -) - -add_executable(paltest_sscanf_test6 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test6 coreclrpal) - -target_link_libraries(paltest_sscanf_test6 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test6/test6.c b/src/pal/tests/palsuite/c_runtime/sscanf/test6/test6.c deleted file mode 100644 index c45ea31b04..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test6/test6.c +++ /dev/null @@ -1,43 +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: test6.c -** -** Purpose: Tests sscanf with octal numbers -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - int n65535 = 65535; /* Walkaround compiler strictness */ - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoNumTest("1234d", "%o", 668); - DoNumTest("1234d", "%2o", 10); - DoNumTest("-1", "%o", -1); - DoNumTest("0x1234", "%o", 0); - DoNumTest("012", "%o", 10); - DoShortNumTest("-1", "%ho", n65535); - DoShortNumTest("200000", "%ho", 0); - DoNumTest("-1", "%lo", -1); - DoNumTest("200000", "%lo", 65536); - DoNumTest("-1", "%Lo", -1); - DoNumTest("200000", "%Lo", 65536); - DoI64NumTest("40000000000", "%I64o", I64(4294967296)); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test6/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test6/testinfo.dat deleted file mode 100644 index b2547a776a..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test6/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test6 -Description -= Tests sscanf with octal numbers diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test7/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test7/CMakeLists.txt deleted file mode 100644 index bcbd268011..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test7/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test7.c -) - -add_executable(paltest_sscanf_test7 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test7 coreclrpal) - -target_link_libraries(paltest_sscanf_test7 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test7/test7.c b/src/pal/tests/palsuite/c_runtime/sscanf/test7/test7.c deleted file mode 100644 index 0899671d64..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test7/test7.c +++ /dev/null @@ -1,43 +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: test7.c -** -** Purpose: Tests sscanf with hex numbers (lowercase) -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - int n65535 = 65535; /* Walkaround compiler strictness */ - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoNumTest("1234i", "%x", 0x1234); - DoNumTest("1234i", "%2x", 0x12); - DoNumTest("-1", "%x", -1); - DoNumTest("0x1234", "%x", 0x1234); - DoNumTest("012", "%x", 0x12); - DoShortNumTest("-1", "%hx", n65535); - DoShortNumTest("10000", "%hx", 0); - DoNumTest("-1", "%lx", -1); - DoNumTest("10000", "%lx", 65536); - DoNumTest("-1", "%Lx", -1); - DoNumTest("10000", "%Lx", 65536); - DoI64NumTest("100000000", "%I64x", I64(4294967296)); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test7/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test7/testinfo.dat deleted file mode 100644 index 614333e650..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test7/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test7 -Description -= Tests sscanf with hex numbers (lowercase) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test8/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test8/CMakeLists.txt deleted file mode 100644 index 211e9e4df6..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test8/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test8.c -) - -add_executable(paltest_sscanf_test8 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test8 coreclrpal) - -target_link_libraries(paltest_sscanf_test8 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test8/test8.c b/src/pal/tests/palsuite/c_runtime/sscanf/test8/test8.c deleted file mode 100644 index 53252f8929..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test8/test8.c +++ /dev/null @@ -1,43 +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: test8.c -** -** Purpose:Tests sscanf with unsigned number -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - -int __cdecl main(int argc, char *argv[]) -{ - int n65535 = 65535; /* Walkaround compiler strictness */ - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoNumTest("1234d", "%u", 1234); - DoNumTest("1234d", "%2u", 12); - DoNumTest("-1", "%u", -1); - DoNumTest("0x1234", "%u", 0); - DoNumTest("012", "%u", 12); - DoShortNumTest("-1", "%hu", n65535); - DoShortNumTest("65536", "%hu", 0); - DoNumTest("-1", "%lu", -1); - DoNumTest("65536", "%lu", 65536); - DoNumTest("-1", "%Lu", -1); - DoNumTest("65536", "%Lu", 65536); - DoI64NumTest("4294967296", "%I64u", I64(4294967296)); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test8/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test8/testinfo.dat deleted file mode 100644 index 2cbc31ad2a..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test8/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 = C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test8 -Description -= Tests sscanf with unsigned numbers diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test9/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/sscanf/test9/CMakeLists.txt deleted file mode 100644 index 77c269aeaa..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test9/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test9.c -) - -add_executable(paltest_sscanf_test9 - ${SOURCES} -) - -add_dependencies(paltest_sscanf_test9 coreclrpal) - -target_link_libraries(paltest_sscanf_test9 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test9/test9.c b/src/pal/tests/palsuite/c_runtime/sscanf/test9/test9.c deleted file mode 100644 index c5a2e0de5d..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test9/test9.c +++ /dev/null @@ -1,38 +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: test9.c -** -** Purpose: Tests sscanf with characters -** -** -**==========================================================================*/ - - - -#include -#include "../sscanf.h" - - -int __cdecl main(int argc, char *argv[]) -{ - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - DoCharTest("1234d", "%c", "1", 1); - DoCharTest("1234d", "%c", "1", 1); - DoCharTest("abc", "%2c", "ab", 2); - DoCharTest(" ab", "%c", " ", 1); - DoCharTest("ab", "%hc", "a", 1); - DoWCharTest("ab", "%lc", convert("a"), 1); - DoCharTest("ab", "%Lc", "a", 1); - DoCharTest("ab", "%I64c", "a", 1); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/c_runtime/sscanf/test9/testinfo.dat b/src/pal/tests/palsuite/c_runtime/sscanf/test9/testinfo.dat deleted file mode 100644 index c0ccc8a4c9..0000000000 --- a/src/pal/tests/palsuite/c_runtime/sscanf/test9/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 =C Runtime -Function = sscanf -Name = Positive Test for sscanf -TYPE = DEFAULT -EXE1 = test9 -Description -= Tests sscanf with characters -- cgit v1.2.3