1 ' This file is part of the LibreOffice project.
3 ' This Source Code Form is subject to the terms of the Mozilla Public
4 ' License, v. 2.0. If a copy of the MPL was not distributed with this
5 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 Function doUnitTest() As String
12 verify_testIsMissingCascade
13 doUnitTest
= TestUtil
.GetResult()
16 Sub verify_testIsMissingCascade()
18 On Error GoTo errorHandler
20 ' tdf#136143 - test cascading optionals in order to prevent type conversion errors, because
21 ' optional arguments are of type SbxERROR and set to not fixed.
22 TestUtil
.AssertEqual(TestOpt(), 2, "Cascading optionals")
26 TestUtil
.ReportErrorHandler("verify_testIsMissingCascade", Err
, Error$, Erl
)
29 Function TestOpt(Optional A
)
30 TestOpt
= TestOptCascade(A
)
33 Function TestOptCascade(Optional A
)
34 If IsMissing(A
) Then A
= 2