mirror of
https://github.com/vlang/v.git
synced 2025-09-16 07:52:32 +03:00
move all vlib modules to vlib/
This commit is contained in:
parent
bdcbcb075b
commit
4594d78bd6
62 changed files with 6 additions and 5 deletions
|
@ -1,21 +0,0 @@
|
|||
import json
|
||||
|
||||
struct User {
|
||||
age int
|
||||
nums []int
|
||||
}
|
||||
|
||||
fn test_parse_user() {
|
||||
s := '{"age": 10, "nums": [1,2,3]}'
|
||||
u := json.decode(User, s) or {
|
||||
exit(1)
|
||||
return
|
||||
}
|
||||
assert u.age == 10
|
||||
assert u.nums.len == 3
|
||||
assert u.nums[0] == 1
|
||||
assert u.nums[1] == 2
|
||||
assert u.nums[2] == 3
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue