c816814ed4
[GB.TEST] * NEW: refactoring and finetuning Assert Notes
54 lines
1.6 KiB
Text
54 lines
1.6 KiB
Text
' Gambas test file
|
|
|
|
Public Sub NoMessage()
|
|
|
|
'There is no message whicht
|
|
Assert.Ok(True)
|
|
|
|
End
|
|
|
|
Public Sub NoMessageInbetween()
|
|
|
|
Assert.Ok(True, "TestNoMessageInbetween Assert 1 description defined")
|
|
Assert.Ok(True)
|
|
Assert.Ok(True, "Assert 3 description defined")
|
|
Assert.Ok(True)
|
|
|
|
End
|
|
|
|
Public Sub Note()
|
|
|
|
Test.Note("This\nis\na\nnote")
|
|
Test.Plan(0)
|
|
Test.Note("The next note is Null and that's alright:")
|
|
Test.Note(Null)
|
|
Test.SkipAll("This doesn't actually assert anything")
|
|
|
|
End
|
|
|
|
Public Sub TestNoteGotAndExpected()
|
|
|
|
'tests the typo of Expected and Got in diagnosis
|
|
'This test must fail to see what happens
|
|
|
|
Dim Expected, Got As String
|
|
|
|
Got = "<ol class='ulist'>" & gb.Lf &
|
|
" <li>Zum 15.12. in die Wintermischung 2</li> " & gb.Lf &
|
|
" <li>Zum 15.2. in die Fellwechselmischung Frühjahr</li> " & gb.Lf &
|
|
" <li>Zum 15.4. in die Sommermischung</li> " & gb.Lf &
|
|
" <li>Zum 15.8. in die Fellwechselmischung Herbst</li> " & gb.Lf &
|
|
" <li>Zum 15.10. in die Wintermischung 1</li> " & gb.Lf &
|
|
"</ol>"
|
|
|
|
Expected = "<ol class='ulist'>" & gb.Lf &
|
|
Trim(" <li>Zum 15.12. in die Wintermischung 2</li> ") & gb.Lf &
|
|
Trim(" <li>Zum 15.2. in die Fellwechselmischung Frühjahr</li> ") & gb.Lf &
|
|
Trim(" <li>Zum 15.4. in die Sommermischung</li> ") & gb.Lf &
|
|
Trim(" <li>Zum 15.8. in die Fellwechselmischung Herbst</li> ") & gb.Lf &
|
|
Trim(" <li>Zum 15.10. in die Wintermischung 1</li> ") & gb.Lf &
|
|
"</ol>"
|
|
|
|
Assert.Equals(Got, Expected, "tests the typo of Expected and Got in diagnosis")
|
|
|
|
End
|