summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/c_runtime/_getw
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/c_runtime/_getw')
-rw-r--r--src/pal/tests/palsuite/c_runtime/_getw/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/_getw/test1/CMakeLists.txt19
-rw-r--r--src/pal/tests/palsuite/c_runtime/_getw/test1/test.datbin28 -> 0 bytes
-rw-r--r--src/pal/tests/palsuite/c_runtime/_getw/test1/test1.cpp96
-rw-r--r--src/pal/tests/palsuite/c_runtime/_getw/test1/testinfo.dat15
5 files changed, 0 insertions, 134 deletions
diff --git a/src/pal/tests/palsuite/c_runtime/_getw/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/_getw/CMakeLists.txt
deleted file mode 100644
index f6aa0cb2d9..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_getw/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-add_subdirectory(test1)
-
diff --git a/src/pal/tests/palsuite/c_runtime/_getw/test1/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/_getw/test1/CMakeLists.txt
deleted file mode 100644
index 4f763bed6b..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_getw/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.cpp
-)
-
-add_executable(paltest_getw_test1
- ${SOURCES}
-)
-
-add_dependencies(paltest_getw_test1 coreclrpal)
-
-target_link_libraries(paltest_getw_test1
- pthread
- m
- coreclrpal
-)
diff --git a/src/pal/tests/palsuite/c_runtime/_getw/test1/test.dat b/src/pal/tests/palsuite/c_runtime/_getw/test1/test.dat
deleted file mode 100644
index b20eae054c..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_getw/test1/test.dat
+++ /dev/null
Binary files differ
diff --git a/src/pal/tests/palsuite/c_runtime/_getw/test1/test1.cpp b/src/pal/tests/palsuite/c_runtime/_getw/test1/test1.cpp
deleted file mode 100644
index 34ce4ee7de..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_getw/test1/test1.cpp
+++ /dev/null
@@ -1,96 +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: Several integers are read from a previously written file
-** using _getw. The test passes if the values read match those known to
-** be in the file.
-**
-**
-**==========================================================================*/
-
-#include <palsuite.h>
-
-/*Tests _getw using a previously written data file */
-int __cdecl main(int argc, char **argv)
-{
- const int testValues[] =
- {
- 0,
- 1,
- -1,
- 0x7FFFFFFF, /* largest positive integer on 32 bit systems */
- 0x80000000, /* largest negative integer on 32 bit systems */
- 0xFFFFFFFF,
- 0xFFFFAAAA
- };
-
- int i = 0;
- int input = 0;
-
- const char filename[] = "test.dat";
-
-
- FILE *fp = NULL;
-
- /*
- * Initialize the PAL and return FAIL if this fails
- */
- if (0 != (PAL_Initialize(argc, argv)))
- {
- return FAIL;
- }
-
- /* write the file that we will use to test */
-
-
- /*
- Don't uncomment this code, it was used to create the data file
- initially on windows, but if it is run on all test platforms, the
- tests will always pass.
-
- fp = fopen(filename, "w");
- if (fp == NULL)
- {
- Fail("Unable to open file for write.\n");
- }
- for (i = 0; i < sizeof(testValues) / sizeof(testValues[0]); i++)
- {
- _putw(testValues[i], fp);
- }
-
- if (fclose(fp) != 0)
- {
- Fail("Error closing file after writing to it with _putw.\n");
- }
- */
-
-
- /*Now read values back from the file and see if they match.*/
- fp = fopen(filename, "r");
- if (fp == NULL)
- {
- Fail ("Unable to open file for read.\n");
- }
- for (i = 0; i < sizeof(testValues) / sizeof(testValues[0]); i++)
- {
- input = _getw(fp);
- if (VAL32(input) != testValues[i])
- {
- Fail ("_getw did not get the expected values when reading "
- "from a file.\n");
- }
- }
-
- if (fclose(fp) != 0)
- {
- Fail ("Error closing file after reading from it with _getw\n");
- }
- PAL_Terminate();
- return PASS;
-}
-
diff --git a/src/pal/tests/palsuite/c_runtime/_getw/test1/testinfo.dat b/src/pal/tests/palsuite/c_runtime/_getw/test1/testinfo.dat
deleted file mode 100644
index 4044dadbcc..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_getw/test1/testinfo.dat
+++ /dev/null
@@ -1,15 +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 = _getw
-Name = Positive Test for _getw
-TYPE = DEFAULT
-EXE1 = test1
-Description
-=Several integers are read from a previously written file
-=using _getw. The test passes if the values read match those known to
-=be in the file.
-