apjanke / octave-testify

New BIST (Built-In Self Test) functions for GNU Octave
GNU General Public License v3.0
4 stars 2 forks source link

support `if (__pkg_test__)` #32

Closed cbm755 closed 5 years ago

cbm755 commented 5 years ago

How about returning a T/F boolean if nargout == 1? And NFAIL for nargout > 1?

-- SUCCESS = __pkg_test__ (...)
 -- [NFAIL, __INFO__] = __pkg_test__ (...)

That's what we do in Doctest. In principle one can if (__pkg_test__) to mean "if successfully ran tests".

cbm755 commented 5 years ago

I did this for runtests in #38.

apjanke commented 5 years ago

Consistency is good. Let's do it.

apjanke commented 5 years ago

Done in https://github.com/apjanke/octave-testify/commit/c8d7b93509118b72577ebefa756ca2e0a2646720.