Assert.ReverseNext

Turns the result of the following assertion the other way round
This commit is contained in:
Christof Thalhofer 2020-04-09 08:09:53 +02:00
parent 815a1ddcf2
commit dfcfac6172

View file

@ -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)