diff options
author | Elliott Hughes <enh@google.com> | 2014-04-29 16:28:56 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-04-29 16:28:56 -0700 |
commit | 01ae00f3170ad0e36c1657f6ff8c89dfa730fd37 (patch) | |
tree | ad9cd6e6b1ee5b01dcc03f09495ee786ea0a12ec /tests/inttypes_test.cpp | |
parent | c6e563c87a7d8329607bccbc5c4a61c4e1180507 (diff) |
Switch to the OpenBSD implementations of the wide scanf functions.
This also gets us the C99 wcstoimax and wcstoumax, and a working fgetwc and
ungetwc, all of which are needed in the implementation.
This also brings several other files closer to upstream.
Change-Id: I23b025a8237a6dbb9aa50d2a96765ea729a85579
Diffstat (limited to 'tests/inttypes_test.cpp')
-rw-r--r-- | tests/inttypes_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/inttypes_test.cpp b/tests/inttypes_test.cpp index ac37e6295..e58850340 100644 --- a/tests/inttypes_test.cpp +++ b/tests/inttypes_test.cpp @@ -38,3 +38,11 @@ TEST(inttypes, misc) { sscanf(buf, "%08" SCNuPTR, &u); sscanf(buf, "%08" SCNxPTR, &u); } + +TEST(inttypes, wcstoimax) { + ASSERT_EQ(123, wcstoimax(L"123", NULL, 10)); +} + +TEST(inttypes, wcstoumax) { + ASSERT_EQ(123U, wcstoumax(L"123", NULL, 10)); +} |