gb.test: fix Assert.ErrorCode and Teardown spelling
[GB.TEST] * BUG: Forward Description in Assert.ErrorCode. * BUG: Fix spelling of TearDown -> Teardown special test method. * OPT: Use Assert.Note() instead of Print in tests.
This commit is contained in:
parent
71b5ca1244
commit
6144a78829
3 changed files with 7 additions and 7 deletions
|
@ -376,7 +376,7 @@ Public Sub ErrorCode(Code As Integer, Optional Description As String) As Boolean
|
||||||
bRes = Fail(Description)
|
bRes = Fail(Description)
|
||||||
Note(("No error happened"))
|
Note(("No error happened"))
|
||||||
Else
|
Else
|
||||||
bRes = Equals(Error.Code, Code)
|
bRes = Equals(Error.Code, Code, Description)
|
||||||
If Not bRes Then
|
If Not bRes Then
|
||||||
Note(Subst$(("Error was: &1 (code: &2) at &3"), Error.Text, Error.Code, Error.Where))
|
Note(Subst$(("Error was: &1 (code: &2) at &3"), Error.Text, Error.Code, Error.Where))
|
||||||
Endif
|
Endif
|
||||||
|
|
|
@ -6,25 +6,25 @@ Public Const ThisIsAnUnitTestSelfTest As Boolean = True
|
||||||
|
|
||||||
Public Sub Setup()
|
Public Sub Setup()
|
||||||
|
|
||||||
Print "# Setup TestModule"
|
Assert.Note("Setup TestModule")
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Public Sub Teardown()
|
Public Sub Teardown()
|
||||||
|
|
||||||
Print "# Teardown TestModule"
|
Assert.Note("Teardown TestModule")
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Public Sub SetupEach()
|
Public Sub SetupEach()
|
||||||
|
|
||||||
Print "# Setup Each"
|
Assert.Note("Setup Each")
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Public Sub TeardownEach()
|
Public Sub TeardownEach()
|
||||||
|
|
||||||
Print "# Teardown Each"
|
Assert.Note("Teardown Each")
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,8 @@ Private Sub StopTestModule(TestModule As Class)
|
||||||
|
|
||||||
Dim Plan As Integer
|
Dim Plan As Integer
|
||||||
|
|
||||||
If TestModule.Symbols.Exist("TearDown") Then
|
If TestModule.Symbols.Exist("Teardown") Then
|
||||||
Object.Call(TestModule, "TearDown")
|
Object.Call(TestModule, "Teardown")
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
Loading…
Reference in a new issue