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

builtin: new str(), hex() functions without C.printf

This commit is contained in:
penguindark
2020-03-11 00:38:11 +01:00
committed by GitHub
parent de55a26cfe
commit 630913d872
4 changed files with 216 additions and 99 deletions

View File

@@ -111,7 +111,11 @@ fn test_int_alias() {
fn test_hex() {
x := u64(10)
assert x.hex() == '0xa'
assert x.hex() == 'a'
b := 1234
assert b.hex() == '4d2'
b1 := -1
assert b1.hex() == 'ffffffff'
}
fn test_oct() {