https://bugs.freedesktop.org/show_bug.cgi?id=84098

          Priority: medium
            Bug ID: 84098
          Assignee: [email protected]
           Summary: kill cut+paste in VBA tests ...
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: 4.3.0.2 rc
         Component: BASIC
           Product: LibreOffice

Existing VBA tests in basic/qa/vba_tests involve a depressing amount of
cut/paste coding - in particular of:

Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional
testComment As String)
...

and:

Dim passCount As Integer
Dim failCount As Integer
Dim result As String

It would be great to create two other small files for these:

sharedVariables.vb
testAsserts.vb

And to tweak:

basic/qa/cppunit/test_vba.cxx

to substitute these into all the other .vb files so we have a consistent set.

It'd be nice to get the OnError handling good too eg.

    TestLog_ASSERT (False), "hit error handler - " & Err & ": " & Error$ & "
(line : " & Erl & ")"

So it prints the actual error / line numbers etc. And of course the body of:

Function doUnitTest() As String
    result = verify_win32compat()
    If failCount <> 0 Then
        doUnitTest = result
    Else
        doUnitTest = "OK"
    End If
End Function

To reduce cut/paste to the maximum =)

I'd suggest using %%include sharedvariables.vb%% or somesuch syntax - you'll
need to invent that, there is no pre-proc in VBA =) and impl. it in the unit
test.

Thanks !

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to