build fix
[LibreOffice.git] / basic / qa / basic_coverage / test_logic_methods.vb
blobcc0bbee8ab2ba657c1345f6f42afb9351fc26b59
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 aVector = Array( Date(), Time(), "Hello", -3.14)
12 ' CHOOSE
13 If (Choose(2, 1, 100, 3) <> 100) Then
14 doUnitTest = 0
15 ' FALSE TRUE
16 Else If (False = True) Then
17 doUnitTest = 0
18 ' IIF
19 Else If ( IIF(True, 10, 12) <> 10 ) Then
20 doUnitTest = 0
21 ' ISARRAY
22 Else If ( IsArray( aVector ) = False ) Then
23 doUnitTest = 0
24 ' ISDATE
25 Else If ( IsDate( aVector(1) ) = False ) Then
26 doUnitTest = 0
27 ' ISEMPTY
28 Else If ( IsEmpty( aVector(2) ) ) Then
29 doUnitTest = 0
30 ' ISERROR
31 ' ISMISSING
32 ' ISNULL
33 Else If ( IsNull( aVector ) ) Then
34 doUnitTest = 0
35 ' ISNUMERIC
36 Else If ( IsNumeric( aVector(3) ) = False ) Then
37 doUnitTest = 0
38 ' IsUnoStruc
39 ' SWITCH
40 Else If ( Switch( False, aVector(0),_
41 True, aVector(1),_
42 False, aVector(2),_
43 True, aVector(3) ) <> aVector(1) ) Then
44 doUnitTest = 0
45 Else
46 doUnitTest = 1
47 End If
48 End If
49 End If
50 End If
51 End If
52 End If
53 End If
54 End If
55 End If
56 End Function