3 Function doUnitTest() As String
6 TestUtil
.AssertEqual(verify_ElseIf
, "OK", "verify_ElseIf", "result")
7 TestUtil
.AssertEqual(verify_nested_Ifs
, "OK", "verify_nested_Ifs", "result")
8 TestUtil
.AssertEqual(verify_oneline
, "OK", "verify_oneline", "result")
10 doUnitTest
= TestUtil
.GetResult()
13 Sub Main
: MsgBox doUnitTest
: End Sub
15 Function verify_ElseIf
As String
19 verify_ElseIf
= "Fail"
21 verify_ElseIf
= "Fail"
23 verify_ElseIf
= "Fail"
24 ElseIf False Then verify_ElseIf
= "Fail"
31 TestUtil
.ReportErrorHandler("verify_ElseIf", Err
, Error$, Erl
)
34 Function verify_oneline
As String
35 If False Then verify_oneline
= "Fail" Else verify_oneline
= "OK"
38 Function verify_nested_Ifs
43 verify_nested_Ifs
= "Fail"
46 verify_nested_Ifs
= "OK"
49 verify_nested_Ifs
= "Fail"
50 ElseIf False Then verify_nested_Ifs
= "Fail"
52 verify_nested_Ifs
= "Fail"
57 TestUtil
.ReportErrorHandler("verify_nested_Ifs", Err
, Error$, Erl
)