Merge branch 'master' of gitlab.com:gambas/gambas

This commit is contained in:
gambas 2020-02-11 01:53:47 +01:00
commit ee6b43ca21
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
' Gambas class file
Inherits UnitTest
''' Tests all Asserts
' Signal, that this is a selftest
Public Const ThisIsAnUnitTestSelfTest As Boolean = True
@ -11,7 +12,6 @@ Public Sub _new()
End
Public Sub TestAssert()
Assert.True(True, "Testing True")
@ -108,4 +108,4 @@ Public Sub TestNote()
Assert.Note("The next note is Null and it should complain about it:")
Assert.Note(Null)
End
End

View File

@ -114,7 +114,8 @@ Public Sub False(Value As Boolean, Optional Message As String) As Boolean
End
'' Asserts that an error happened. You have to create the error with Try. For example: Try(2/0)
'' Asserts that an error happened. You have to create the error with Try.
'' For example: Try 2/0
Public Sub Error(Optional Message As String) As Boolean
@ -126,6 +127,7 @@ Public Sub Error(Optional Message As String) As Boolean
Body = Trim(Body)
Message &= Body
Endif
Error.Clear
Return Test(True, Message)
Else