LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / basic / qa / basic_coverage / test_Property.GetSet.bas
blob701bcc7f49e0cbf82f8fd926325c2dcfbc1b5805
2 ' This file is part of the LibreOffice project.
4 ' This Source Code Form is subject to the terms of the Mozilla Public
5 ' License, v. 2.0. If a copy of the MPL was not distributed with this
6 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 Option Explicit
10 Option Compatible
12 Function doUnitTest as String
13 ' PROPERTY GET/SET for classes or UNO services
15 Set objSetter = New Collection ' OR objLetter = New Collection
16 If ( objGetter.Count <> 3 ) Then
17 doUnitTest = "FAIL" ' not Ok
18 Else
19 doUnitTest = "OK" ' Ok
20 End If
21 End Function
23 Sub DEV_TST : MsgBox doUnitTesT : End Sub
25 Property Get objGetter As Object
26 _obj.add "roots"
27 Set objGetter = _obj
28 End Property
30 Private _obj As Object
32 Property Set objSetter(value As Object)
33 Set _obj = value
34 With _obj
35 .add "branches"
36 .add "leaves"
37 End With
38 End Property