From 00b644e88c9bd202e3794ad1387eb58674ea882f Mon Sep 17 00:00:00 2001 From: Zdeněk Crhonek Date: Tue, 5 Dec 2017 23:23:37 +0100 Subject: VBA test - error() function Change-Id: Ia667342f9112932c71df593f08371d3c35255b19 Reviewed-on: https://gerrit.libreoffice.org/45917 Tested-by: Jenkins Reviewed-by: Eike Rathke --- basic/qa/vba_tests/error.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'basic/qa/vba_tests') diff --git a/basic/qa/vba_tests/error.vb b/basic/qa/vba_tests/error.vb index fd96f80b14d0..e36661253be2 100644 --- a/basic/qa/vba_tests/error.vb +++ b/basic/qa/vba_tests/error.vb @@ -6,7 +6,7 @@ Dim result As String Function doUnitTest() As String result = verify_testError() -If failCount <> 0 And passCount > 0 Then +If failCount <> 0 or passCount = 0 Then doUnitTest = result Else doUnitTest = "OK" @@ -27,9 +27,9 @@ Function verify_testError() As String testName = "Test Error function" On Error GoTo errorHandler - date2 = Error(62) 'https://help.libreoffice.org/3.3/Basic/Error_Function_Runtime - date1 = "Input past end of file" - TestLog_ASSERT date1 = date2, "the return Error is: " & date1 + date2 = Error(11) 'https://help.libreoffice.org/Basic/Error_Function_Runtime + date1 = "Division by zero." + TestLog_ASSERT date1 = date2, "the return Error is: " & date2 result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10) verify_testError = result -- cgit