help-octave
[Top][All Lists]
Advanced

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

Re: Unit tests


From: Pavel Hofman
Subject: Re: Unit tests
Date: Mon, 18 Feb 2019 15:58:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Hi Markus,

Thanks a lot for your valuable info.

Dne 18. 02. 19 v 15:07 "Markus Mützel" napsal(a):
On 18 Feb 2019 07:53:35 Pavel Hofman wrote:
Is it possible to test an internal function of a script? E.g. the main
function (named after the script) does something complex which is hard
to test (storing/loading file) and the actual features to test are
implemented in internal functions within the script. I have not found I
way to run the internal function in the %!test section.

Unfortunately, it is not possible to run tests for local or private functions.
Only tests for functions that are in the global scope can be run. This are 
functions in the path that can be called directly from e.g. the command window.

OK, I will copy the private functions into separate files for unit testing.

Is it possible to run all tests within a directory/subdirectories, IOW
testing the whole project?

Try the following:
runtests path_to_files_with_tests

Exactly what I was looking for, works great. Thanks!

Pavel.



reply via email to

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