gambas-source-code/main/lib/test/gb.test/.src/TestMyself/TElse.test

59 lines
1.7 KiB
Text
Raw Normal View History

' Gambas test file
Public Sub NoMessage()
'There is no message
Test.Plan(1)
Assert.Ok(True)
End
Public Sub NoMessageInbetween()
Test.Plan(4)
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
Test.Plan(1)
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