build fix
[LibreOffice.git] / basic / qa / basic_coverage / test_array_methods.vb
blob093867a85440e422b99cf2e9750d518991f99525
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 Function doUnitTest as Integer
10 dim aVector as Variant
11 ' ARRAY
12 aVector = Array( Date(), Time(), "Hello", -3.14)
13 If (aVector(2) <> "Hello") Then
14 doUnitTest = 0
15 ' LBOUND
16 Else If ( LBound( aVector() ) <> 0 ) Then
17 doUnitTest = 0
18 ' TYPELEN
19 Else If ( TypeLen(aVector(2)) <> 5 ) Then
20 doUnitTest = 0
21 ' TYPENAME
22 Else If ( TypeName(aVector(2)) <> "String" ) Then
23 doUnitTest = 0
24 ' UBOUND
25 Else If ( UBound( aVector() ) <> 3 ) Then
26 doUnitTest = 0
27 ' VARTYPE
28 Else If ( VarType(aVector(2)) <> 8 ) Then
29 doUnitTest = 0
30 Else
31 doUnitTest = 1
32 End If
33 End If
34 End If
35 End If
36 End If
37 End If
38 End Function