Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / basic / qa / vba_tests / abs.vb
blobc6f1b8fff901cac5e025ed7df2623b5e2f7e08a0
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 Rem Attribute VBA_ModuleType=VBAModule
10 Option VBASupport 1
11 Option Explicit
13 Function doUnitTest() As String
14 TestUtil.TestInit
15 verify_testABS
16 doUnitTest = TestUtil.GetResult()
17 End Function
19 Sub verify_testABS()
20 On Error GoTo errorHandler
22 TestUtil.AssertEqual(Abs(-5), 5, "Abs(-5)")
23 TestUtil.AssertEqual(Abs(5), 5, "Abs(5)")
24 TestUtil.AssertEqual(Abs(-21.7), 21.7, "Abs(-21.7)")
26 Exit Sub
27 errorHandler:
28 TestUtil.ReportErrorHandler("verify_testABS", Err, Error$, Erl)
29 End Sub