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?