Debian Codegraph @

basic/qa/basic_coverage/test_err_method.bas

raw
1 ' This file is part of the LibreOffice project.
2 '
3 ' This Source Code Form is subject to the terms of the Mozilla Public
4 ' License, v. 2.0. If a copy of the MPL was not distributed with this
5 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 '
7
8 Option Explicit
9
10 Function doUnitTest as String
11 ' ERR
12 On Error GoTo ErrorHandler ' Set up error handler
13 Dim nVar As Integer
14 nVar = 0
15 nVar = 1/nVar
16 doUnitTest = "FAIL"
17 Exit Function
18 ErrorHandler:
19 If ( Err <> 11 ) Then
20 doUnitTest = "FAIL"
21 Else
22 doUnitTest = "OK"
23 Endif
24 End Function