diff --git a/app/src/gambas3-selftest/.src/Tests/GambasSelftests.test b/app/src/gambas3-selftest/.src/Tests/GambasSelftests.test index d47ff29f0..cc198b784 100644 --- a/app/src/gambas3-selftest/.src/Tests/GambasSelftests.test +++ b/app/src/gambas3-selftest/.src/Tests/GambasSelftests.test @@ -2343,29 +2343,33 @@ Fast Public Sub IntegerOverflows() ' ------------------------------------------------- Ignore Overflows - System.IgnoreOverflow = True + If Jit.Enabled = False Then - Test.Note("Ignore Short Overflow") - s = HighestShort + 1 + System.IgnoreOverflow = True - Test.Note("Ignore Integer Overflow") - i = HighestInteger + 1 + Test.Note("Ignore Short Overflow") + s = HighestShort + 1 - Test.Note("Ignore Long Overflow") - l = HighestLong + 1 + Test.Note("Ignore Integer Overflow") + i = HighestInteger + 1 - Test.Note("Ignore Short Underflow") - s = LowestShort - 1 + Test.Note("Ignore Long Overflow") + l = HighestLong + 1 - Test.Note("Ignore Integer Underflow") - i = LowestInteger - 1 + Test.Note("Ignore Short Underflow") + s = LowestShort - 1 - Test.Note("Ignore Long Underflow") - l = LowestLong - 1 + Test.Note("Ignore Integer Underflow") + i = LowestInteger - 1 - ' ------------------------------------------------- Restore original behavior + Test.Note("Ignore Long Underflow") + l = LowestLong - 1 - System.IgnoreOverflow = bIgnoreOverflows + ' ------------------------------------------------- Restore original behavior + + System.IgnoreOverflow = bIgnoreOverflows + + Endif End @@ -2376,38 +2380,38 @@ Fast Unsafe Public Sub IntegerOverflowsUnsafe() Dim l As Integer If Jit.Enabled Then - + Test.Plan(6) Test.Note("Short Unsafe Overflow") s = HighestShort + 1 - Assert.Ok(s) + Assert.Noterror() Test.Note("Integer Unsafe Overflow") i = HighestInteger + 1 - Assert.Ok(i) + Assert.Noterror() Test.Note("Long Unsafe Overflow") l = HighestLong + 1 - Assert.Ok(l) - + Assert.Noterror() + Test.Note("Short Unsafe Underflow") s = LowestShort - 1 - Assert.Ok(s) + Assert.Noterror() Test.Note("Integer Unsafe Underflow") i = LowestInteger - 1 - Assert.Ok(i) + Assert.Noterror() Test.Note("Long Unsafe Underflow") l = LowestLong - 1 - Assert.Ok(l) + Assert.Noterror() - Else + Else Test.Note("Jit disabled") Test.Plan(1) 'minimum 1 test Assert.Equals(1, 1, "useless test, otherwise gb.test reports a failure") Endif -End \ No newline at end of file +End diff --git a/app/src/gambas3-selftest/.test b/app/src/gambas3-selftest/.test index bfeac52a9..4e4f00f5b 100644 --- a/app/src/gambas3-selftest/.test +++ b/app/src/gambas3-selftest/.test @@ -5,11 +5,11 @@ Default="GambasSelftests.IntegerOverflows;IntegerOverflowsUnsafe" [TestSuites/1] Name="Fast" -Tests="Errorhandling.GeneralError,GambasSelftests.FastTests;IntegerOverflows;TCatch;TError;TVal,LocalStaticFun.CountALot;Saysth;SwingDoor" +Tests="Errorhandling.GeneralError,GambasSelftests.FastTests;IntegerOverflows;IntegerOverflowsUnsafe;TCatch;TError;TVal,LocalStaticFun.CountALot;Saysth;SwingDoor" [TestSuites/2] Name="Full" -Tests="Errorhandling.GeneralError,FileReadWrite.FileReadWrite;ReadUrandom;ReadZero,GambasSelftests.FastTests;IntegerOverflows;TCatch;TError;TVal,LocalStaticFun.CountALot;Saysth;SwingDoor,SlowThousandsProcs.FewThousandProcesses,Timers.Timers" +Tests="Errorhandling.GeneralError,FileReadWrite.FileReadWrite;ReadUrandom;ReadZero,GambasSelftests.FastTests;IntegerOverflows;IntegerOverflowsUnsafe;TCatch;TError;TVal,LocalStaticFun.CountALot;Saysth;SwingDoor,SlowThousandsProcs.FewThousandProcesses,Timers.Timers" [TestSuites/3] Name="Slow tests" @@ -17,5 +17,5 @@ Tests="FileReadWrite.FileReadWrite;ReadUrandom;ReadZero,SlowThousandsProcs.FewTh [TestSuites/4] Name="Production" -Tests="Errorhandling.GeneralError,FileReadWrite.FileReadWrite;ReadUrandom;ReadZero,GambasSelftests.FastTests;IntegerOverflows;TCatch;TError;TVal,LocalStaticFun.CountALot;Saysth;SwingDoor,SlowThousandsProcs.FewThousandProcesses" +Tests="Errorhandling.GeneralError,FileReadWrite.FileReadWrite;ReadUrandom;ReadZero,GambasSelftests.FastTests;IntegerOverflows;IntegerOverflowsUnsafe;TCatch;TError;TVal,LocalStaticFun.CountALot;Saysth;SwingDoor,SlowThousandsProcs.FewThousandProcesses"