1
0
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:
yuyi 2022-08-23 12:59:50 +08:00 committed by GitHub
parent 196b5f8e3a
commit a758b6686c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}}'