mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
json: minor cleanup in json_test.v (#15501)
This commit is contained in:
parent
196b5f8e3a
commit
a758b6686c
1 changed files with 4 additions and 4 deletions
|
@ -490,20 +490,20 @@ fn test_byte_array() {
|
|||
}
|
||||
|
||||
struct Aa {
|
||||
sub SumType
|
||||
sub AliasType
|
||||
}
|
||||
|
||||
struct Bb {
|
||||
a int
|
||||
}
|
||||
|
||||
type SumType = Bb
|
||||
type AliasType = Bb
|
||||
|
||||
fn test_encode_alias_field() {
|
||||
s := json.encode(Aa{
|
||||
sub: SumType(Bb{
|
||||
sub: Bb{
|
||||
a: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
println(s)
|
||||
assert s == '{"sub":{"a":1}}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue