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 Function doUnitTest
as String
17 doUnitTest
= "For Each over array failed"
21 If TestInvalidForEachWithErrorHandler
<> "13 91 14 " Then
22 doUnitTest
= "For Each doesn't generate proper errors on bad arguments"
29 Function TestInvalidForEachWithErrorHandler
31 On Error Goto ErrHandler
32 ' This For Each is given a bad iterable; it must generate first error ("Data type mismatch") for b;
34 ' Then proceed here (Resume Next from ErrHandler), and generate "Object variable not set" for c;
36 ' Then proceed here (Resume Next from ErrHandler), and generate "Invalid parameter" at Next.
38 TestInvalidForEachWithErrorHandler
= s