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/.
12 ' assigns a numeric constant (integer) to a parameter of type variant
13 Function assignInteger( numericConstant
) As String
15 assignInteger
= TypeName( numericConstant
)
18 ' assigns a numeric constant (long) to a parameter of type variant
19 Function assignLong( numericConstant
) As String
20 numericConstant
= 32768
21 assignLong
= TypeName( numericConstant
)
24 Function doUnitTest() As String
25 ' tdf#133913 - check if numeric constants are converted correctly to
26 ' their respective types, if they are passed as arguments to a function
27 ' with variant parameter types.
28 On Error GoTo errorHandler
29 If (assignInteger( 1 ) = "Integer" And assignLong( 1 ) = "Long") Then