Files
loongoffice/basic/qa/basic_coverage/test_conversion_methods.vb
Laurent Balland-Poirier 40578897d3 basic: cleanup test_*_methods
cleanup
remove duplicate test with other tests

Change-Id: I4c82ad9f226f25080199ac0dc3815492fc4c265a
Reviewed-on: https://gerrit.libreoffice.org/31860
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2016-12-24 16:28:28 +00:00

50 lines
1.2 KiB
VB.net

'
' This file is part of the LibreOffice project.
'
' This Source Code Form is subject to the terms of the Mozilla Public
' License, v. 2.0. If a copy of the MPL was not distributed with this
' file, You can obtain one at http://mozilla.org/MPL/2.0/.
'
Function doUnitTest as Integer
Randomize 42
dim aVector as Variant
aVector = Array( Date(), Time(), "Hello", -3.14)
' CBOOL
If (CBool(3) <> True) Then
doUnitTest = 0
' CBYTE
ElseIf (CByte("3") <> 3) Then
doUnitTest = 0
' CCUR
ElseIf (CCur("100") <> 100) Then
doUnitTest = 0
' CDATE
ElseIf (CDate(100) <> 100) Then
doUnitTest = 0
' CDEC already tested
'ElseIf (CDec("100") <> 100) Then
' doUnitTest = 0
' CDBL
ElseIf (CDbl("100") <> 100) Then
doUnitTest = 0
' CINT
ElseIf (CInt("100") <> 100) Then
doUnitTest = 0
' CLNG already tested
'ElseIf (CLng("100") <> 100) Then
' doUnitTest = 0
' CSNG
ElseIf (CSng("100") <> 100) Then
doUnitTest = 0
' CSTR
ElseIf (CStr(100) <> "100") Then
doUnitTest = 0
' VAL
ElseIf ( Val("4") <> 4 ) Then
doUnitTest = 0
Else
doUnitTest = 1
End If
End Function