mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
Tests: Add test for String::bijective_base_from()
This commit is contained in:
parent
b0ff91ff09
commit
aaf232f903
1 changed files with 9 additions and 0 deletions
|
@ -283,6 +283,15 @@ TEST_CASE(find_with_empty_needle)
|
|||
EXPECT_EQ(string.find_all(""sv), (Vector<size_t> { 0u, 1u, 2u, 3u }));
|
||||
}
|
||||
|
||||
TEST_CASE(bijective_base)
|
||||
{
|
||||
EXPECT_EQ(String::bijective_base_from(0), "A");
|
||||
EXPECT_EQ(String::bijective_base_from(25), "Z");
|
||||
EXPECT_EQ(String::bijective_base_from(26), "AA");
|
||||
EXPECT_EQ(String::bijective_base_from(52), "BA");
|
||||
EXPECT_EQ(String::bijective_base_from(704), "ABC");
|
||||
}
|
||||
|
||||
TEST_CASE(roman_numerals)
|
||||
{
|
||||
auto zero = String::roman_number_from(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue