mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: json sumtype inlining (#11961)
This commit is contained in:

committed by
GitHub

parent
430677a0c0
commit
c75271fcb7
@ -65,7 +65,7 @@ fn test_encode_decode_sumtype() ? {
|
||||
other: [
|
||||
Entity(Item{'Pen'}),
|
||||
Item{'Cookie'},
|
||||
Animal.dog,
|
||||
Animal.cat,
|
||||
'Stool',
|
||||
time.now(),
|
||||
]
|
||||
@ -81,6 +81,7 @@ fn test_encode_decode_sumtype() ? {
|
||||
|
||||
assert game.title == dec.title
|
||||
assert game.player == dec.player
|
||||
assert (game.other[2] as Animal) == (dec.other[2] as Animal)
|
||||
assert (game.other[4] as time.Time).unix_time() == (dec.other[4] as time.Time).unix_time()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user