Bug Hunting Session
Bug 84098 - kill copy+paste in VBA tests ...
Summary: kill copy+paste in VBA tests ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.3.0.2 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2014-09-19 13:59 UTC by Michael Meeks
Modified: 2018-01-29 09:00 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2014-09-19 13:59:12 UTC
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 !
Comment 1 Rosemary Sebastian 2015-07-21 09:58:55 UTC
Hello! I'm starting work on this bug.
Comment 2 Robinson Tryon (qubit) 2015-12-10 11:40:56 UTC Comment hidden (obsolete)
Comment 3 Robinson Tryon (qubit) 2016-02-18 14:52:26 UTC Comment hidden (obsolete)
Comment 4 Marc Antoine Dumont 2016-10-24 19:08:53 UTC
I would like to start to work on this issue.
Comment 5 jani 2016-10-24 19:11:51 UTC
(In reply to Marc Antoine Dumont from comment #4)
> I would like to start to work on this issue.

Welcome, please assign it to yourself.

here is a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved
Comment 6 jani 2016-10-29 08:32:34 UTC
change status
Comment 7 jani 2016-11-29 07:07:00 UTC
A polite ping, still working on this issue ?
Comment 8 jani 2017-01-09 08:27:07 UTC
Unassing, due to lack of work...if you still work on it, please assign it again.
Comment 9 Ekansh Jha 2018-01-11 17:47:30 UTC
Hello, I would like to work on this issue. I am confused about the contents
that the above two mentioned files " sharedVariables.vb testAsserts.vb"
will contain.