gb.test Assert.Note complains about Null value

[GB.TEST]
    * NEW: Assert.Note complains about Null value
This commit is contained in:
Christof Thalhofer 2020-02-01 23:54:01 +01:00
parent 272cef7472
commit 313ef71b0f
3 changed files with 13 additions and 2 deletions

View file

@ -4,7 +4,7 @@ Public Sub Main()
' These must succeed:
' UnitTest.Main("TestAllAsserts", Null, True)
UnitTest.Main("TestAllAsserts", Null, True)
' UnitTest.Main("TestSetup", Null, True)
' UnitTest.Main("TestElse", Null, True)
' UnitTest.Main("TestError", Null, True)
@ -18,7 +18,7 @@ Public Sub Main()
'UnitTest.Main(Null, Null, True)
' Just one test
UnitTest.Main("TestAllAsserts", "TestAssert", True)
'UnitTest.Main("TestAllAsserts", "TestAssert", True)
'Cheese()

View file

@ -102,3 +102,10 @@ Public Sub TestAssertErrorWithCode()
Assert.ErrorWithCode(26, "Test error with code")
End
Public Sub TestNote()
Assert.Note("The next note is Null and it should complain about it:")
Assert.Note(Null)
End

View file

@ -6,6 +6,10 @@ Export
Public Sub Note(Message As String)
If Message = Null Then
Message = "Got Null in " & Track.ContainerName & ":" & Track.TestName & " ... WHAT???"
Endif
PrintBody(Message)
End