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

all: byte => u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 14:58:56 +03:00
parent b49d873217
commit d4a0d6f73c
221 changed files with 1365 additions and 1365 deletions

View File

@@ -111,23 +111,23 @@ fn test_url_decode_str() {
assert test == 'Hello Base64Url encoding!'
}
fn test_encode_null_byte() {
assert base64.encode([byte(`A`), 0, `C`]) == 'QQBD'
fn test_encode_null_u8() {
assert base64.encode([u8(`A`), 0, `C`]) == 'QQBD'
}
fn test_encode_null_byte_str() {
// While this works, bytestr() does a memcpy
s := [byte(`A`), 0, `C`].bytestr()
s := [u8(`A`), 0, `C`].bytestr()
assert base64.encode_str(s) == 'QQBD'
}
fn test_decode_null_byte() {
assert base64.decode('QQBD') == [byte(`A`), 0, `C`]
fn test_decode_null_u8() {
assert base64.decode('QQBD') == [u8(`A`), 0, `C`]
}
fn test_decode_null_byte_str() {
// While this works, bytestr() does a memcpy
s := [byte(`A`), 0, `C`].bytestr()
s := [u8(`A`), 0, `C`].bytestr()
assert base64.decode_str('QQBD') == s
}