Assert.ReverseNext
Turns the result of the following assertion the other way round
This commit is contained in:
parent
815a1ddcf2
commit
dfcfac6172
1 changed files with 17 additions and 0 deletions
|
@ -23,6 +23,8 @@ Private $aActiveTests As Subtest[]
|
|||
Private $hCurrent As New Subtest
|
||||
Private $hOutput As Stream
|
||||
|
||||
Private $IsNextReverse As Boolean
|
||||
|
||||
Public Sub _new()
|
||||
|
||||
Reset()
|
||||
|
@ -42,6 +44,12 @@ Public Sub Reset()
|
|||
|
||||
End
|
||||
|
||||
Public Sub ReverseNext()
|
||||
|
||||
$IsNextReverse = True
|
||||
|
||||
End
|
||||
|
||||
Public Sub Setup(Optional Tests As Integer, Optional Comment As String, Optional {Output} As Stream)
|
||||
|
||||
If IsMissing({Output}) Then {Output} = $hOutput
|
||||
|
@ -105,6 +113,15 @@ End
|
|||
|
||||
Public Sub Ok(Result As Boolean, Optional Description As String) As Boolean
|
||||
|
||||
If $IsNextReverse = True Then
|
||||
If Result = True Then
|
||||
Result = False
|
||||
Else
|
||||
Result = True
|
||||
Endif
|
||||
$IsNextReverse = False
|
||||
Endif
|
||||
|
||||
With $hCurrent
|
||||
If .Directive <> Tap.NONE Then
|
||||
.Printer.Test(Result,, Description, .Directive, .Comment)
|
||||
|
|
Loading…
Reference in a new issue