On Nov 1, 12:16 pm, "Edward K. Ream" <[email protected]> wrote:

> > As of rev 4690, Leo supports "hidden" unit tests.  This just may be
> > the missing piece of Leo's unit testing arsenal.
>
> The more I use hidden unit tests, the less I like them.  It's
> frustrating: the are *almost* exactly what is wanted, but not quite.
>
> The "reload" problem keeps biting.

I am going to change my mind again.  This pattern *can* be useful.
The trick is to run tests externally.

    # Binding in .leo files that use hidden tests.
    Alt-4: run-marked-unit-tests-externally
    Alt-5: run-all-unit-tests-externally

This is not a cure-all: it's not possible (or rather, not accurate) to
test gui-related code externally.  However, running many unit tests
externally is perfectly feasible.

I spent several hours this morning making external unit tests work
more smoothly:

- The code that runs external tests now knows about hidden tests.
It's remarkable how easy it is to violate the DRY (Don't repeat
yourself) principle.

- Leo now runs external unit tests much more quietly.  It took a lot
of noodling to discover where the annoying signon from
dynamicUnitTest.leo was coming from.  Now it's gone.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to