summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/c_runtime/swprintf
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-02-10 11:35:12 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2017-02-10 11:35:12 (GMT)
commit4b11dc566a5bbfa1378d6266525c281b028abcc8 (patch)
treeb48831a898906734f8884d08b6e18f1144ee2b82 /src/pal/tests/palsuite/c_runtime/swprintf
parentdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff)
downloadcoreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.zip
coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.gz
coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.bz2
Imported Upstream version 1.0.0.9910upstream/1.0.0.9910
Diffstat (limited to 'src/pal/tests/palsuite/c_runtime/swprintf')
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/CMakeLists.txt1
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h60
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test1/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp2
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test10/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test11/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test12/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test13/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test14/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test15/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test16/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test17/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test18/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test19/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp8
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test2/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp6
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test3/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp6
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test4/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp2
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test5/CMakeLists.txt19
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test5/test5.cpp67
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test5/testinfo.dat12
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test6/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test7/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test8/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/swprintf/test9/CMakeLists.txt4
28 files changed, 42 insertions, 213 deletions
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/CMakeLists.txt
index cafb953..8fe1cb6 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/CMakeLists.txt
@@ -14,7 +14,6 @@ add_subdirectory(test19)
add_subdirectory(test2)
add_subdirectory(test3)
add_subdirectory(test4)
-add_subdirectory(test5)
add_subdirectory(test6)
add_subdirectory(test7)
add_subdirectory(test8)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h b/src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h
index 6f4c914..210b12e 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h
@@ -18,7 +18,7 @@ void DoWStrTest(const WCHAR *formatstr, WCHAR *param, const WCHAR *checkstr)
{
WCHAR buf[256] = { 0 };
- swprintf(buf, formatstr, param);
+ swprintf_s(buf, _countof(buf), formatstr, param);
if (memcmp(buf, checkstr, wcslen(checkstr) * 2 + 2) != 0)
{
@@ -33,7 +33,7 @@ void DoStrTest(const WCHAR *formatstr, char *param, const WCHAR *checkstr)
{
WCHAR buf[256] = { 0 };
- swprintf(buf, formatstr, param);
+ swprintf_s(buf, _countof(buf), formatstr, param);
if (memcmp(buf, checkstr, wcslen(checkstr) * 2 + 2) != 0)
{
@@ -48,7 +48,7 @@ void DoPointerTest(const WCHAR *formatstr, void* param, const WCHAR *checkstr1)
{
WCHAR buf[256] = { 0 };
- swprintf(buf, formatstr, param);
+ swprintf_s(buf, _countof(buf), formatstr, param);
if (memcmp(buf, checkstr1, wcslen(checkstr1)*2 + 2) != 0)
{
Fail("ERROR: failed to insert pointer to %#p into \"%s\"\n"
@@ -57,51 +57,11 @@ void DoPointerTest(const WCHAR *formatstr, void* param, const WCHAR *checkstr1)
}
}
-void DoCountTest(const WCHAR *formatstr, int param, const WCHAR *checkstr)
-{
- WCHAR buf[512] = { 0 };
- int n = -1;
-
- swprintf(buf, formatstr, &n);
-
- if (n != param)
- {
- Fail("ERROR: Expected count parameter to resolve to %d, got %d\n",
- param, n);
- }
-
- if (memcmp(buf, checkstr, wcslen(checkstr)*2 + 2) != 0)
- {
- Fail("ERROR: Expected \"%s\" got \"%s\".\n",
- convertC(checkstr), convertC(buf));
- }
-}
-
-void DoShortCountTest(const WCHAR *formatstr, int param, const WCHAR *checkstr)
-{
- WCHAR buf[256] = { 0 };
- short int n = -1;
-
- swprintf(buf, formatstr, &n);
-
- if (n != param)
- {
- Fail("ERROR: Expected count parameter to resolve to %d, got %d\n",
- param, n);
- }
-
- if (memcmp(buf, checkstr, wcslen(checkstr)*2 + 2) != 0)
- {
- Fail("ERROR: Expected \"%s\" got \"%s\".\n",
- convertC(checkstr), convertC(buf));
- }
-}
-
void DoCharTest(const WCHAR *formatstr, char param, const WCHAR *checkstr)
{
WCHAR buf[256] = { 0 };
- swprintf(buf, formatstr, param);
+ swprintf_s(buf, _countof(buf), formatstr, param);
if (memcmp(buf, checkstr, wcslen(checkstr)*2 + 2) != 0)
{
Fail("ERROR: failed to insert char \'%c\' (%d) into \"%s\"\n"
@@ -114,7 +74,7 @@ void DoWCharTest(const WCHAR *formatstr, WCHAR param, const WCHAR *checkstr)
{
WCHAR buf[256] = { 0 };
- swprintf(buf, formatstr, param);
+ swprintf_s(buf, _countof(buf), formatstr, param);
if (memcmp(buf, checkstr, wcslen(checkstr)*2 + 2) != 0)
{
Fail("ERROR: failed to insert wide char \'%c\' (%d) into \"%s\"\n"
@@ -127,7 +87,7 @@ void DoNumTest(const WCHAR *formatstr, int value, const WCHAR *checkstr)
{
WCHAR buf[256] = { 0 };
- swprintf(buf, formatstr, value);
+ swprintf_s(buf, _countof(buf), formatstr, value);
if (memcmp(buf, checkstr, wcslen(checkstr)* 2 + 2) != 0)
{
Fail("ERROR: failed to insert %#x into \"%s\"\n"
@@ -141,7 +101,7 @@ void DoI64Test(const WCHAR *formatstr, INT64 param, char *paramdesc,
{
WCHAR buf[256] = { 0 };
- swprintf(buf, formatstr, param);
+ swprintf_s(buf, _countof(buf), formatstr, param);
if (memcmp(buf, checkstr1, wcslen(checkstr1)*2 + 2) != 0)
{
Fail("ERROR: failed to insert %s into \"%s\"\n"
@@ -155,7 +115,7 @@ void DoDoubleTest(const WCHAR *formatstr, double value, const WCHAR *checkstr1,
{
WCHAR buf[256] = { 0 };
- swprintf(buf, formatstr, value);
+ swprintf_s(buf, _countof(buf), formatstr, value);
if (memcmp(buf, checkstr1, wcslen(checkstr1)*2 + 2) != 0 &&
memcmp(buf, checkstr2, wcslen(checkstr2)*2 + 2) != 0)
{
@@ -171,7 +131,7 @@ void DoArgumentPrecTest(const WCHAR *formatstr, int precision, void *param,
{
WCHAR buf[256];
- swprintf(buf, formatstr, precision, param);
+ swprintf_s(buf, _countof(buf), formatstr, precision, param);
if (memcmp(buf, checkstr1, wcslen(checkstr1) + 2) != 0 &&
memcmp(buf, checkstr2, wcslen(checkstr2) + 2) != 0)
{
@@ -187,7 +147,7 @@ void DoArgumentPrecDoubleTest(const WCHAR *formatstr, int precision, double para
{
WCHAR buf[256];
- swprintf(buf, formatstr, precision, param);
+ swprintf_s(buf, _countof(buf), formatstr, precision, param);
if (memcmp(buf, checkstr1, wcslen(checkstr1) + 2) != 0 &&
memcmp(buf, checkstr2, wcslen(checkstr2) + 2) != 0)
{
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test1/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test1/CMakeLists.txt
index c9be8c3..f89cfb6 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test1/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test1/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test1
add_dependencies(paltest_swprintf_test1 coreclrpal)
target_link_libraries(paltest_swprintf_test1
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp b/src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp
index 626040d..c47d7d5 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp
@@ -31,7 +31,7 @@ int __cdecl main(int argc, char *argv[])
}
checkstr = convert("hello world");
- swprintf(buf, convert("hello world"));
+ swprintf_s(buf, _countof(buf), convert("hello world"));
if (memcmp(checkstr, buf, wcslen(checkstr)*2+2) != 0)
{
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test10/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test10/CMakeLists.txt
index 2221083..70581d1 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test10/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test10/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test10
add_dependencies(paltest_swprintf_test10 coreclrpal)
target_link_libraries(paltest_swprintf_test10
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test11/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test11/CMakeLists.txt
index 96222a5..4d51917 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test11/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test11/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test11
add_dependencies(paltest_swprintf_test11 coreclrpal)
target_link_libraries(paltest_swprintf_test11
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test12/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test12/CMakeLists.txt
index 1ffe620..57cce16 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test12/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test12/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test12
add_dependencies(paltest_swprintf_test12 coreclrpal)
target_link_libraries(paltest_swprintf_test12
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test13/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test13/CMakeLists.txt
index 8699589..5b6c635 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test13/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test13/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test13
add_dependencies(paltest_swprintf_test13 coreclrpal)
target_link_libraries(paltest_swprintf_test13
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test14/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test14/CMakeLists.txt
index 2a4b848..88334d6 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test14/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test14/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test14
add_dependencies(paltest_swprintf_test14 coreclrpal)
target_link_libraries(paltest_swprintf_test14
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test15/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test15/CMakeLists.txt
index 22382bc..5387060 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test15/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test15/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test15
add_dependencies(paltest_swprintf_test15 coreclrpal)
target_link_libraries(paltest_swprintf_test15
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test16/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test16/CMakeLists.txt
index 462f080..4f66bea 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test16/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test16/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test16
add_dependencies(paltest_swprintf_test16 coreclrpal)
target_link_libraries(paltest_swprintf_test16
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test17/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test17/CMakeLists.txt
index c5b4d44..ace16a1 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test17/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test17/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test17
add_dependencies(paltest_swprintf_test17 coreclrpal)
target_link_libraries(paltest_swprintf_test17
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test18/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test18/CMakeLists.txt
index 6cdf576..ddce256 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test18/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test18/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test18
add_dependencies(paltest_swprintf_test18 coreclrpal)
target_link_libraries(paltest_swprintf_test18
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test19/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test19/CMakeLists.txt
index 334b7b4..8d48ce4 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test19/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test19/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test19
add_dependencies(paltest_swprintf_test19 coreclrpal)
target_link_libraries(paltest_swprintf_test19
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp b/src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp
index c034603..0967bc8 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp
@@ -33,14 +33,6 @@ int __cdecl main(int argc, char *argv[])
convert("ba"), convert("ba"));
DoArgumentPrecTest(convert("%.*S"), 2, (void*)"bar", "bar", convert("ba"),
convert("ba"));
- DoArgumentPrecTest(convert("%.*n"), 3, (void*)&n, "pointer to int", convert(""),
- convert(""));
- if (n != 0)
- {
- Fail("ERROR: Expected count parameter to resolve to %d, got %X\n",
- 0, n);
- }
-
DoArgumentPrecTest(convert("%.*c"), 0, (void*)'a', "a", convert("a"),
convert("a"));
DoArgumentPrecTest(convert("%.*c"), 4, (void*)'a', "a", convert("a"),
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test2/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test2/CMakeLists.txt
index af2b13e..fcf7136 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test2/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test2/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test2
add_dependencies(paltest_swprintf_test2 coreclrpal)
target_link_libraries(paltest_swprintf_test2
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp b/src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp
index deffd3e..1c2f420 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp
@@ -40,6 +40,12 @@ int __cdecl main(int argc, char *argv[])
DoWStrTest(convert("foo %5.2s"), convert("bar"), convert("foo ba"));
DoWStrTest(convert("foo %-5s"), convert("bar"), convert("foo bar "));
DoWStrTest(convert("foo %05s"), convert("bar"), convert("foo 00bar"));
+ DoWStrTest(convert("foo %s"), NULL, convert("foo (null)"));
+ DoStrTest(convert("foo %hs"), NULL, convert("foo (null)"));
+ DoWStrTest(convert("foo %ls"), NULL, convert("foo (null)"));
+ DoWStrTest(convert("foo %ws"), NULL, convert("foo (null)"));
+ DoWStrTest(convert("foo %Ls"), NULL, convert("foo (null)"));
+ DoWStrTest(convert("foo %I64s"), NULL, convert("foo (null)"));
PAL_Terminate();
return PASS;
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test3/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test3/CMakeLists.txt
index 14b81f4..cc79c2d 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test3/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test3/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test3
add_dependencies(paltest_swprintf_test3 coreclrpal)
target_link_libraries(paltest_swprintf_test3
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp b/src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp
index 42875c0..8c6c38c 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp
@@ -38,6 +38,12 @@ int __cdecl main(int argc, char *argv[])
DoStrTest(convert("foo %5.2S"),"bar", convert("foo ba"));
DoStrTest(convert("foo %-5S"), "bar", convert("foo bar "));
DoStrTest(convert("foo %05S"), "bar", convert("foo 00bar"));
+ DoStrTest(convert("foo %S"), NULL, convert("foo (null)"));
+ DoStrTest(convert("foo %hS"), NULL, convert("foo (null)"));
+ DoWStrTest(convert("foo %lS"), NULL, convert("foo (null)"));
+ DoWStrTest(convert("foo %wS"), NULL, convert("foo (null)"));
+ DoStrTest(convert("foo %LS"), NULL, convert("foo (null)"));
+ DoStrTest(convert("foo %I64S"), NULL, convert("foo (null)"));
PAL_Terminate();
return PASS;
}
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test4/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test4/CMakeLists.txt
index e153e6b..c5d9246 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test4/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test4/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test4
add_dependencies(paltest_swprintf_test4 coreclrpal)
target_link_libraries(paltest_swprintf_test4
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp b/src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp
index 02cc3f9..9a68bda 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp
@@ -33,7 +33,7 @@ int __cdecl main(int argc, char *argv[])
/*
** Run only on 64 bit platforms
*/
-#if defined(BIT64) && defined(PLATFORM_UNIX)
+#if defined(BIT64)
Trace("Testing for 64 Bit Platforms \n");
DoPointerTest(convert("%p"), NULL, convert("0000000000000000"));
DoPointerTest(convert("%p"), ptr, convert("0000000000123456"));
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test5/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test5/CMakeLists.txt
deleted file mode 100644
index 967ccbb..0000000
--- a/src/pal/tests/palsuite/c_runtime/swprintf/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.cpp
-)
-
-add_executable(paltest_swprintf_test5
- ${SOURCES}
-)
-
-add_dependencies(paltest_swprintf_test5 coreclrpal)
-
-target_link_libraries(paltest_swprintf_test5
- pthread
- m
- coreclrpal
-)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test5/test5.cpp b/src/pal/tests/palsuite/c_runtime/swprintf/test5/test5.cpp
deleted file mode 100644
index e85adc1..0000000
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test5/test5.cpp
+++ /dev/null
@@ -1,67 +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 swprintf with the count specifier
-**
-**
-**==========================================================================*/
-
-
-
-#include <palsuite.h>
-#include "../swprintf.h"
-
-/*
- * Uses memcmp & wcslen
- */
-
-int __cdecl main(int argc, char *argv[])
-{
- WCHAR *longStr;
- WCHAR *longResult;
-
- if (PAL_Initialize(argc, argv) != 0)
- {
- return FAIL;
- }
-
- longStr =
- convert("really-long-string-that-just-keeps-going-on-and-on-and-on.."
- "..................useless-filler.................................."
- "..................useless-filler.................................."
- "..................useless-filler.................................."
- "%n bar");
- longResult =
- convert("really-long-string-that-just-keeps-going-on-and-on-and-on.."
- "..................useless-filler.................................."
- "..................useless-filler.................................."
- "..................useless-filler.................................."
- " bar");
-
- DoCountTest(convert("foo %n bar"), 4, convert("foo bar"));
- DoCountTest(longStr, 257, longResult);
- DoCountTest(convert("fo%n bar"), 2, convert("fo bar"));
- DoCountTest(convert("%n"), 0, convert(""));
- DoCountTest(convert("foo %#n bar"), 4, convert("foo bar"));
- DoCountTest(convert("foo % n bar"), 4, convert("foo bar"));
- DoCountTest(convert("foo %+n bar"), 4, convert("foo bar"));
- DoCountTest(convert("foo %-n bar"), 4, convert("foo bar"));
- DoCountTest(convert("foo %0n bar"), 4, convert("foo bar"));
- DoShortCountTest(convert("foo %hn bar"), 4, convert("foo bar"));
- DoCountTest(convert("foo %ln bar"), 4, convert("foo bar"));
- DoCountTest(convert("foo %Ln bar"), 4, convert("foo bar"));
- DoCountTest(convert("foo %I64n bar"), 4, convert("foo bar"));
- DoCountTest(convert("foo %20.3n bar"), 4, convert("foo bar"));
-
- PAL_Terminate();
-
- free(longStr);
- free(longResult);
-
- return PASS;
-}
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test5/testinfo.dat b/src/pal/tests/palsuite/c_runtime/swprintf/test5/testinfo.dat
deleted file mode 100644
index ef1f1ff..0000000
--- a/src/pal/tests/palsuite/c_runtime/swprintf/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 = swprintf
-Name = Positive Test for swprintf
-TYPE = DEFAULT
-EXE1 = test5
-Description
-= Tests swprintf with the count specifier
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test6/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test6/CMakeLists.txt
index 806211a..044029d 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test6/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test6/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test6
add_dependencies(paltest_swprintf_test6 coreclrpal)
target_link_libraries(paltest_swprintf_test6
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test7/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test7/CMakeLists.txt
index cf56379..3ee7139 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test7/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test7/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test7
add_dependencies(paltest_swprintf_test7 coreclrpal)
target_link_libraries(paltest_swprintf_test7
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test8/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test8/CMakeLists.txt
index e8fcf66..55ac85c 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test8/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test8/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test8
add_dependencies(paltest_swprintf_test8 coreclrpal)
target_link_libraries(paltest_swprintf_test8
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)
diff --git a/src/pal/tests/palsuite/c_runtime/swprintf/test9/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/swprintf/test9/CMakeLists.txt
index c616348..7d7f524 100644
--- a/src/pal/tests/palsuite/c_runtime/swprintf/test9/CMakeLists.txt
+++ b/src/pal/tests/palsuite/c_runtime/swprintf/test9/CMakeLists.txt
@@ -13,7 +13,5 @@ add_executable(paltest_swprintf_test9
add_dependencies(paltest_swprintf_test9 coreclrpal)
target_link_libraries(paltest_swprintf_test9
- pthread
- m
- coreclrpal
+ ${COMMON_TEST_LIBRARIES}
)