Skip to content

Commit 474642e

Browse files
committed
#150 - Test CppStringT::isupper() with char and wchar_t
Tested.
1 parent b1c0e4c commit 474642e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

cpp-strings-tests/cpp-strings-tests.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,22 @@ namespace cppstringstests
679679
Assert::IsTrue(ws.title().istitle());
680680
}
681681

682+
TEST_METHOD(isupper)
683+
{
684+
Assert::IsFalse(CppString().isupper());
685+
for (int c = 0; c <= 255; ++c) {
686+
const char ch{ char(c) };
687+
pcs::CppString s(5, ch);
688+
Assert::AreEqual(pcs::is_upper(ch), s.isupper());
689+
}
690+
691+
Assert::IsFalse(CppWString().isupper());
692+
for (int c = 0; c <= 0xffff; ++c) {
693+
const wchar_t wch{ wchar_t(c) };
694+
pcs::CppWString ws(5, wch);
695+
Assert::AreEqual(pcs::is_upper(wch), ws.isupper());
696+
}
697+
}
682698

683699
};
684700
}

0 commit comments

Comments
 (0)