From be0eb109b4b7f939409ad0d7cf4eff52144239e6 Mon Sep 17 00:00:00 2001 From: Christof Thalhofer Date: Tue, 20 Dec 2022 15:22:50 +0100 Subject: [PATCH] GambasSelftests Todo for future CShort overflow [DEVELOPMENT ENVIRONMENT] * BUG: CFloat Test failed * NEW: GambasSelftests Test Todo for CShort overflow --- app/src/gambas3-selftest/.src/Tests/GambasSelftests.test | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/gambas3-selftest/.src/Tests/GambasSelftests.test b/app/src/gambas3-selftest/.src/Tests/GambasSelftests.test index 817eef074..76683cab9 100644 --- a/app/src/gambas3-selftest/.src/Tests/GambasSelftests.test +++ b/app/src/gambas3-selftest/.src/Tests/GambasSelftests.test @@ -718,10 +718,16 @@ Fast Public Function FastTests() As Integer Endif Test.Note("CShort") - If CShort(1000) <> 1000 Or CShort("17") <> 17 Or CShort(True) <> -1 Then + If CShort("17") <> 17 Or CShort(True) <> -1 Then Assert.Fail("CShort") Endif + Test.Note("CShort Overflow") + Test.TODO("Expected error, that an overflow happened in CShort") + Dim siShort As Short + Try siShort = CShort(100000) + Assert.Error() + Test.Note("CSingle") If Format$(CSingle("+3.1416"), "#.####") <> Str$(3.1416) Or CSingle("1.0E+3") <> 1000 Then '' Or CSng(Pi) <> 3.141592741013 Then' Actually gives 3.14159274101257 Which is correct?