diff --git a/comp/src/gb.test.tap/.src/Assert.class b/comp/src/gb.test.tap/.src/Assert.class index 8f549cd04..17ece9c4d 100644 --- a/comp/src/gb.test.tap/.src/Assert.class +++ b/comp/src/gb.test.tap/.src/Assert.class @@ -17,13 +17,21 @@ End Struct Property Output As Stream -Private $aActiveTests As New Subtest[] +Private $aActiveTests As Subtest[] Private $hCurrent As New Subtest -Private $hOutput As Stream = File.Out +Private $hOutput As Stream Public Sub _new() - With $hCurrent = New Subtest + Reset() + +End + +Public Sub Reset() + + $aActiveTests = New Subtest[] + $hOutput = File.Out + With $hCurrent = New Subtest .Printer = New TapPrinter As "Printer" .Indent = 0 .Success = True diff --git a/comp/src/gb.test.tap/.src/Tap/TapPrinter.class b/comp/src/gb.test.tap/.src/Tap/TapPrinter.class index dba0780df..282a1beea 100644 --- a/comp/src/gb.test.tap/.src/Tap/TapPrinter.class +++ b/comp/src/gb.test.tap/.src/Tap/TapPrinter.class @@ -45,11 +45,11 @@ End Public Sub Finish() - If $iPlan > Tap.NO_PLAN Then Return ' already printed the "plan" line If $bFinished Then Error.Raise(("Tests already finished")) + $bFinished = True + If $iPlan > Tap.NO_PLAN Then Return ' already printed the "plan" line $iPlan = $iTestsRun Print("1.." & $iPlan) - $bFinished = True End