byte: more tests
parent
3722e16073
commit
5c4c4354b1
|
@ -2,10 +2,12 @@
|
|||
*Not yet released*
|
||||
- `vweb` now uses struct embedding: `app.vweb.text('hello') => app.text('hello')`.
|
||||
- Consts can now be declared outside of `const()` blocks: `const x = 0`.
|
||||
- Allow overloading of `>`, `<`, `!=` and `==` operators.
|
||||
- Add struct updating syntax: `Mystruct{ ...ms, name: 'new' }`.
|
||||
- Overloading of `>`, `<`, `!=`, and `==` operators.
|
||||
- New struct updating syntax: `User{ ...u, name: 'new' }` to replace `{ u | name: 'new' }`.
|
||||
- `byte.str()` has been fixed and works like with all other numbers. `byte.ascii_str()` has been added.
|
||||
|
||||
## V 0.2.1
|
||||
*30 Dec 2020*
|
||||
- Hashmap bootstrapping fixes.
|
||||
- Array decomposition to varargs: `fn sum(i ...int) int` => `a := [2,3,4] println(sum(a...))`
|
||||
- HTML module docs generated by vdoc now have global search.
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue