mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 02:54:54 +03:00
Tests: Add test for String::bijective_base_from()
This commit is contained in:
parent
b0ff91ff09
commit
aaf232f903
Notes:
sideshowbarker
2024-07-18 07:12:00 +09:00
Author: https://github.com/Mandar12 Commit: https://github.com/SerenityOS/serenity/commit/aaf232f903d Pull-request: https://github.com/SerenityOS/serenity/pull/9237 Reviewed-by: https://github.com/TobyAsE Reviewed-by: https://github.com/alimpfard
@ -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…
Reference in New Issue
Block a user