mirror of
https://github.com/vlang/v.git
synced 2025-09-09 15:27:05 -04:00
builtin: add tests for rune.to_upper() (#22801)
This commit is contained in:
parent
43d9cd6e90
commit
43afa8d94e
@ -40,3 +40,36 @@ fn test_bytes() {
|
||||
r1 := `★`
|
||||
assert r1.bytes() == [u8(0xe2), 0x98, 0x85]
|
||||
}
|
||||
|
||||
fn test_to_upper() {
|
||||
assert `c`.to_upper() == `C`
|
||||
assert `C`.to_upper() == `C`
|
||||
assert `δ`.to_upper() == `Δ`
|
||||
assert `Δ`.to_upper() == `Δ`
|
||||
assert `ā`.to_upper() == `Ā`
|
||||
assert `Ā`.to_upper() == `Ā`
|
||||
assert `Я`.to_upper() == `Я`
|
||||
assert `я`.to_upper() == `Я`
|
||||
}
|
||||
|
||||
fn test_to_lower() {
|
||||
assert `C`.to_lower() == `c`
|
||||
assert `c`.to_lower() == `c`
|
||||
assert `Δ`.to_lower() == `δ`
|
||||
assert `δ`.to_lower() == `δ`
|
||||
assert `Ā`.to_lower() == `ā`
|
||||
assert `ā`.to_lower() == `ā`
|
||||
assert `я`.to_lower() == `я`
|
||||
assert `Я`.to_lower() == `я`
|
||||
}
|
||||
|
||||
fn test_to_title() {
|
||||
assert `c`.to_title() == `C`
|
||||
assert `C`.to_title() == `C`
|
||||
assert `δ`.to_title() == `Δ`
|
||||
assert `Δ`.to_title() == `Δ`
|
||||
assert `ā`.to_title() == `Ā`
|
||||
assert `Ā`.to_title() == `Ā`
|
||||
assert `я`.to_title() == `Я`
|
||||
assert `Я`.to_title() == `Я`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user