v2 / vlib / v / tests / c_struct_with_reserved_field_name_test.v
22 lines · 20 sloc · 335 bytes · bbb61ab3687afe512a1fa12492c876d011626107
Raw
1// vtest build: !musl?
2import gg
3
4struct Game {
5mut:
6 gg ?gg.Context
7}
8
9fn test_c_struct_with_reserved_field_name() {
10 mut game := Game{
11 gg: none
12 }
13 mut cont := gg.new_context(
14 bg_color: gg.rgb(174, 198, 255)
15 width: 600
16 height: 400
17 window_title: 'Polygons'
18 )
19 game.gg = cont
20 game.gg?.str()
21 assert true
22}
23