summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2021-09-17 18:19:09 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-09-17 22:59:51 +0000
commitff0ab8b9a96ab784d9cd077b5f8e105492e55b9b (patch)
tree429c96e1b015cc6f1faa6092c3139f2aee2453bc /Tests
parent7b17230d7aec439f2015391099802cfdcdf7cd61 (diff)
downloadserenity-ff0ab8b9a96ab784d9cd077b5f8e105492e55b9b.zip
LibC: Implement wctrans
Diffstat (limited to 'Tests')
-rw-r--r--Tests/LibC/TestWctype.cpp11
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);
+}