octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56325] Make runtests Matlab compatible


From: Andrew Janke
Subject: [Octave-bug-tracker] [bug #56325] Make runtests Matlab compatible
Date: Fri, 17 May 2019 20:07:44 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36

Follow-up Comment #4, bug #56325 (project octave):

Matlab's runtests() is part of Matlab's xUnit-based Unit Testing framework.
It's not just "not 100% compatible" with Octave's existing BIST testing
framework; it's closer to 0% compatible, both in terms of how the tests are
defined, and the functions and data structures used to run the tests and
present results.

I think that Matlab compatibility is a strong reason for giving up the
"runtests" function name and reserving that for a future Matlab-compatible
test-running function. But the existing BIST framework is both extensive and
valuable, so I think Octave should just rename its current "runtests" to
"runbists" or something else that doesn't collide with the Matlab style
"runtests", rather than drop it entirely or commit to porting its tests over
to the new Matlab style.

> Testify should definitely drop the name, unless it wants to shadow the
function... but that sounds like a bad idea.

Testify is intended to potentially be a replacement for Octave's current
BIST/runtests(), so it uses a similarly-named "runtests2" function. (The "2"
suffix is just to avoid shadowing Octave's own "runtests"; there's no real
significance to it.) If Octave renames its "runtests", then Testify will
follow suit.

Also, If there's interest in having an Octave implementation of a
Matlab-compatible xUnit-style framework, I will add one to Testify. Comment
here if you want it to happen:
https://github.com/apjanke/octave-testify/issues/5.

I think both the BIST style tests and xUnit style tests (and doctest style
tests, too!) could comfortably coexist in Octave. Ideally, probably the best
end state is to have one unified "runalltests" function that can discover and
run tests of both formats, so you can run all your tests with a single call,
and get a unified results output. (You could probably even change the BIST
runner implementation to do dymanically-constructed tests in terms of the
xUnit style data/control structures, keeping the existing BIST definitions but
running them under a new-style framework.) I don't know if that unified
function could be called "runtests", though, because Matlab has claimed that
part of the API namespace, along with its signature.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56325>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]