help-octave
[Top][All Lists]
Advanced

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

Re: Unit tests


From: Markus Mützel
Subject: Re: Unit tests
Date: Mon, 18 Feb 2019 15:07:14 +0100

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.

> 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


Markus



reply via email to

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