summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxhdrs/iconv/iconv_close.c
diff options
context:
space:
mode:
authorJacob Shin <jacobshin313@gmail.com>2018-12-03 23:42:01 -0500
committerJoel Sherrill <joel@rtems.org>2018-12-04 09:32:37 -0600
commitadc11af97a9a0f9341948042e56fc58d346bf207 (patch)
treea06e3d04ecaabb0a6fa892c78b9f20c0d25f4202 /testsuites/psxtests/psxhdrs/iconv/iconv_close.c
parentbsp/leon3: Fix CPU counter frequency (diff)
downloadrtems-adc11af97a9a0f9341948042e56fc58d346bf207.tar.bz2
psxhdrs: Implement POSIX API Signature Compliance Tests for iconv.h (GCI 2018)
Diffstat (limited to '')
-rwxr-xr-xtestsuites/psxtests/psxhdrs/iconv/iconv_close.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxhdrs/iconv/iconv_close.c b/testsuites/psxtests/psxhdrs/iconv/iconv_close.c
new file mode 100755
index 0000000000..285f1b50f4
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/iconv/iconv_close.c
@@ -0,0 +1,37 @@
+/**
+ * @file
+ * @brief iconv_close() API Conformance Test
+ */
+
+ /*
+ * COPYRIGHT (c) 2018.
+ * Jacob Shin
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <iconv.h>
+
+int test( void );
+
+int test( void )
+{
+ iconv_t cd = iconv_open("UTF-8", "WCHAR_T");
+ int return_value;
+
+ return_value = iconv_close(cd);
+ return (return_value != -1);
+} \ No newline at end of file