diff options
author | Jacob Shin <jacobshin313@gmail.com> | 2018-12-08 13:49:20 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2018-12-09 09:10:11 -0600 |
commit | a5c0886a6d3161ce6a8fd7b4e2cc402336670a4d (patch) | |
tree | b509d94680ae2445adb694fcade319c35889faa9 /testsuites/psxtests/psxhdrs/stdlib/wctomb.c | |
parent | psxhdrs: POSIX Signature Test for syslog.h (GCI2018) (diff) | |
download | rtems-a5c0886a6d3161ce6a8fd7b4e2cc402336670a4d.tar.bz2 |
psxhdrs: Add POSIX API Signature Compliance Tests for stdlib.h (GCI 2018)
Diffstat (limited to '')
-rwxr-xr-x | testsuites/psxtests/psxhdrs/stdlib/wctomb.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxhdrs/stdlib/wctomb.c b/testsuites/psxtests/psxhdrs/stdlib/wctomb.c new file mode 100755 index 0000000000..2029486c25 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/stdlib/wctomb.c @@ -0,0 +1,38 @@ +/** + * @file + * @brief wctomb() 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 <stdlib.h> + +int test( void ); + +int test( void ) +{ + int return_value; + char s[1]; + wchar_t wchar = L'c'; + + return_value = wctomb(s, wchar); + return (return_value != -1); +}
\ No newline at end of file |