gambas-source-code/main/lib/test/gb.test/.src/TestAssertion.class

32 lines
917 B
Text
Raw Normal View History

' Gambas class file
''' This class represents an "ok" or "not ok" line in TAP.
''' It is generated by TapPrinter and TapParser.
Export
'' Possible values for the Directive field
Public Enum NONE = 0, TODO = 1, SKIP
'' The serial number of this test.
Public Id As Long = 0
'' Whether "ok" or "not ok" was printed.
Public Ok As Boolean = False
'' The test description.
Public Description As String = Null
'' The TAP directive constant NONE, TODO or SKIP.
Public Directive As Integer = NONE
'' The comment after the test description and directive, if any.
Public Comment As String = Null
'' If this is a subtest summary assertion, here are the child assertions.
Public Subtests As New TestAssertion[]
'' Whether the test counts as succeeded. A "not ok" test can succeed if it was marked as TODO.
Property Read Success As Boolean
Private Function Success_Read() As Boolean
Return Ok Or (Directive = TODO)
End