mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
json: minor cleanup in json_test.v (#15501)
This commit is contained in:
parent
196b5f8e3a
commit
a758b6686c
@ -490,20 +490,20 @@ fn test_byte_array() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct Aa {
|
struct Aa {
|
||||||
sub SumType
|
sub AliasType
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Bb {
|
struct Bb {
|
||||||
a int
|
a int
|
||||||
}
|
}
|
||||||
|
|
||||||
type SumType = Bb
|
type AliasType = Bb
|
||||||
|
|
||||||
fn test_encode_alias_field() {
|
fn test_encode_alias_field() {
|
||||||
s := json.encode(Aa{
|
s := json.encode(Aa{
|
||||||
sub: SumType(Bb{
|
sub: Bb{
|
||||||
a: 1
|
a: 1
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
println(s)
|
println(s)
|
||||||
assert s == '{"sub":{"a":1}}'
|
assert s == '{"sub":{"a":1}}'
|
||||||
|
Loading…
Reference in New Issue
Block a user