diff options
Diffstat (limited to 'v_windows/v/vlib/v/tests/str_circular_test.v')
-rw-r--r-- | v_windows/v/vlib/v/tests/str_circular_test.v | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/tests/str_circular_test.v b/v_windows/v/vlib/v/tests/str_circular_test.v new file mode 100644 index 0000000..7479937 --- /dev/null +++ b/v_windows/v/vlib/v/tests/str_circular_test.v @@ -0,0 +1,21 @@ +[heap] +struct Aa { +mut: + bs []Bb +} + +struct Bb { +mut: + a &Aa +} + +fn test_circular() { + mut b := Bb{ + a: &Aa{ + bs: []Bb{cap: 1} + } + } + b.a.bs << b + s := b.str() + assert s.len < 3500 +} |