LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / basic / qa / basic_coverage / test_mod_operator.bas
blob79ad49fda113e2e73aa04eba0761f0ac8a6cc73b
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 Option Explicit
11 Function doUnitTest as String
13 doUnitTest = "FAIL"
15 Dim a As Double, b as Double
16 a = 16.4
17 b = 5.9
19 ' tdf#141201 - MOD operands are rounded to Integer values before the operation is performed
20 if (a MOD b <> 4) Then Exit Function
21 if (16.4 MOD 5.9 <> 4) Then Exit Function
22 if (15.9 MOD 6.4 <> 4) Then Exit Function
23 if (2147483647.4 MOD 4 <> 3) Then Exit Function
25 doUnitTest = "OK"
27 End Function