gb.test Assert.Error clears error
This commit is contained in:
parent
7475109afe
commit
d9fff7c380
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue