1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

byte: more tests

This commit is contained in:
Alexander Medvednikov
2021-01-05 19:34:42 +01:00
parent 3722e16073
commit 5c4c4354b1
2 changed files with 9 additions and 3 deletions

View File

@@ -5,8 +5,12 @@ fn test_clone() {
assert b[0] == 0
assert b[1] == 1
assert b[2] == 2
println(b[1].ascii_str())
assert b[1].str() == '1'
xx := byte(35)
assert xx.str() == '35'
assert xx.ascii_str() == '#'
println(typeof(`A`))
assert typeof(`A`) == 'rune'
x := rune(`A`)
assert x.str() == 'A'
assert typeof(x) == 'rune'