gb.test Assert.Error clears error

This commit is contained in:
Christof Thalhofer 2020-02-10 11:18:29 +01:00
parent 7475109afe
commit d9fff7c380

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