mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 13:11:46 +03:00
Tests: Only test truthiness for iswctype
This commit is contained in:
parent
338f80cbf6
commit
65bcee3c62
Notes:
sideshowbarker
2024-07-18 01:55:06 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/65bcee3c62f Pull-request: https://github.com/SerenityOS/serenity/pull/10585 Reviewed-by: https://github.com/bgianfo
@ -46,18 +46,18 @@ TEST_CASE(iswctype)
|
||||
|
||||
// Test that valid properties are wired to the correct implementation.
|
||||
for (unsigned int i = 0; i < sizeof(test_chars) / sizeof(test_chars[0]); i++) {
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("alnum")), iswalnum(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("alpha")), iswalpha(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("blank")), iswblank(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("cntrl")), iswcntrl(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("digit")), iswdigit(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("graph")), iswgraph(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("lower")), iswlower(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("print")), iswprint(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("punct")), iswpunct(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("space")), iswspace(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("upper")), iswupper(test_chars[i]));
|
||||
EXPECT_EQ(iswctype(test_chars[i], wctype("xdigit")), iswxdigit(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("alnum")), iswalnum(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("alpha")), iswalpha(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("blank")), iswblank(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("cntrl")), iswcntrl(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("digit")), iswdigit(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("graph")), iswgraph(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("lower")), iswlower(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("print")), iswprint(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("punct")), iswpunct(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("space")), iswspace(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("upper")), iswupper(test_chars[i]));
|
||||
EXPECT_EQ_TRUTH(iswctype(test_chars[i], wctype("xdigit")), iswxdigit(test_chars[i]));
|
||||
}
|
||||
|
||||
// Test that invalid properties always return zero.
|
||||
|
Loading…
Reference in New Issue
Block a user