From 47c1a3d8799d99403505bc91a8a5eabc8ab9490c Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 19 Oct 2024 15:53:05 +1300 Subject: [PATCH] test/marshalling: rerun test multiple times to help detect heap corruption --- examples/marshalling/marshalling_test.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/marshalling/marshalling_test.go b/examples/marshalling/marshalling_test.go index 6aff7c94..65be1985 100644 --- a/examples/marshalling/marshalling_test.go +++ b/examples/marshalling/marshalling_test.go @@ -8,9 +8,7 @@ import ( "github.com/mappu/miqt/qt" ) -func TestMarshalling(t *testing.T) { - - qt.NewQApplication(os.Args) +func testMarshalling(t *testing.T) { // Bool t.Run("Bool", func(t *testing.T) { @@ -107,5 +105,16 @@ func TestMarshalling(t *testing.T) { } }) +} + +func TestMarshalling(t *testing.T) { + + qt.NewQApplication(os.Args) + + // In case of heap corruption, run the whole test multiple times. + + for i := 0; i < 5; i++ { + testMarshalling(t) + } }