mirror of
https://github.com/vlang/v.git
synced 2025-09-13 09:25:45 -04:00
tests: add an edge test case, in which the array was initialised with an expression without commas, to enum_on_array_init_test.v (#23945)
This commit is contained in:
parent
1f10a65515
commit
e1ce57dd73
@ -21,6 +21,11 @@ fn test_main() {
|
|||||||
'conejo': .rabbit
|
'conejo': .rabbit
|
||||||
}
|
}
|
||||||
assert map_2.str() == "{'gato': cat, 'perro': dog, 'conejo': rabbit}"
|
assert map_2.str() == "{'gato': cat, 'perro': dog, 'conejo': rabbit}"
|
||||||
|
|
||||||
array := [Animal.cat, .dog, .rabbit]
|
array := [Animal.cat, .dog, .rabbit]
|
||||||
assert array.str() == '[cat, dog, rabbit]'
|
assert array.str() == '[cat, dog, rabbit]'
|
||||||
|
// vfmt off
|
||||||
|
array_1 := [Animal.cat .dog .rabbit]
|
||||||
|
// vfmt on
|
||||||
|
assert array_1.str() == '[cat, dog, rabbit]'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user