LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / basic / qa / basic_coverage / test_ismissing_cascade.bas
blobf2f3a8b20564aa006174ee3377852c58e71a2e05
1 Option Explicit
3 Function doUnitTest() As String
4 TestUtil.TestInit
5 verify_testIsMissingCascade
6 doUnitTest = TestUtil.GetResult()
7 End Function
9 Sub verify_testIsMissingCascade()
11 On Error GoTo errorHandler
13 ' tdf#136143 - test cascading optionals in order to prevent type conversion errors, because
14 ' optional arguments are of type SbxERROR and set to not fixed.
15 TestUtil.AssertEqual(TestOpt(), 2, "Cascading optionals")
17 Exit Sub
18 errorHandler:
19 TestUtil.ReportErrorHandler("verify_testIsMissingCascade", Err, Error$, Erl)
20 End Sub
22 Function TestOpt(Optional A)
23 TestOpt = TestOptCascade(A)
24 End Function
26 Function TestOptCascade(Optional A)
27 If IsMissing(A) Then A = 2
28 TestOptCascade = A
29 End Function