test/marshalling: rerun test multiple times to help detect heap corruption

This commit is contained in:
mappu 2024-10-19 15:53:05 +13:00
parent 6da9849a4a
commit 47c1a3d879

View File

@ -8,9 +8,7 @@ import (
"github.com/mappu/miqt/qt" "github.com/mappu/miqt/qt"
) )
func TestMarshalling(t *testing.T) { func testMarshalling(t *testing.T) {
qt.NewQApplication(os.Args)
// Bool // Bool
t.Run("Bool", func(t *testing.T) { 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)
}
} }