diff options
author | Tim Schumacher <timschumi@gmx.de> | 2021-09-17 18:19:09 +0200 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-09-17 22:59:51 +0000 |
commit | ff0ab8b9a96ab784d9cd077b5f8e105492e55b9b (patch) | |
tree | 429c96e1b015cc6f1faa6092c3139f2aee2453bc /Tests | |
parent | 7b17230d7aec439f2015391099802cfdcdf7cd61 (diff) | |
download | serenity-ff0ab8b9a96ab784d9cd077b5f8e105492e55b9b.zip |
LibC: Implement wctrans
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/LibC/TestWctype.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/LibC/TestWctype.cpp b/Tests/LibC/TestWctype.cpp index 190d152f6d..401ce66635 100644 --- a/Tests/LibC/TestWctype.cpp +++ b/Tests/LibC/TestWctype.cpp @@ -28,3 +28,14 @@ TEST_CASE(wctype) EXPECT(wctype("") == 0); EXPECT(wctype("abc") == 0); } + +TEST_CASE(wctrans) +{ + // Test that existing character mappings return non-zero wctrans values. + EXPECT(wctrans("tolower") != 0); + EXPECT(wctrans("toupper") != 0); + + // Test that invalid character mappings return the "invalid" wctrans value (0). + EXPECT(wctrans("") == 0); + EXPECT(wctrans("abc") == 0); +} |