Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Assert module details
Login with GitLab

Assert module

A collection of predicate, i.e. true or false, functions
(761 downloads for this version - 14946 downloads for all versions)
A more recent valid version with binaries for Scilab 5.2 exists: 1.3
Michael Baudin
Owner Organization
Michael BAUDIN
Creation Date
September 6, 2010
Source created on
Scilab 5.2.x
Binaries available on
Scilab 5.2.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("assert")

The goal of this toolbox is to provide assert function. We emphasize the 
numerical issues, with the goal of testing numerical algorithms more 
easily. In particular, we provide a comparison function for two floating 
point numbers, which allows to assert that two numbers are "close" 
(including, but not limited to, equal).

The function of the assert module are designed to be used in Scilab unit tests
files (.tst files).

The following is a list of the current features: 

 * assert for true, equal statements
 * assert that two floating point numbers are "close". Use an relative or a
absolute tolerance
 * provide a sorting function for double complex numbers with a mixed
relative/absolute tolerance criteria.

The following is a list of the current assert functions :

 * assert_almostequal : Check that computed and expected are numerically close.
 * assert_equal : Check that computed and expected are equal.
 * assert_true : Check that condition is true.
and sorting functions :
 * assert_compare : The default comparison function used in the sort-merge.
 * assert_comparecomplex : Compare complex numbers with a tolerance.
 * assert_sort : A flexible sorting function.
 * assert_sortcomplex : Compare complex numbers with a tolerance.

The toolbox is based on macros.

To get an overview of the functions in this module, 
use :

help assert_overview


 * DONE : add a numerically aware sorting algorithm
 * DONE : add unit tests for assert_compare
 * DONE : add unit tests for assert_comparecomplex
 * DONE : fix examples in assert_comparecomplex
 * DONE : add unit tests for assert_sort
 * DONE : add unit tests for assert_sortcomplex
 * DONE : added a consistent callback.
 * DONE : added increasing/decreasing direction.


 * TODO : make a consistent use of the apifun module.

Files (2)
[145.73 kB]
Source code archive
assert (0.2)
    * Added assert_filesequal function, with a comparison function.
    * Added assert_false function.
    * Added elementwise comparison for assert_almostequal.
    * Fixed bug for %inf in almostequal.
    * Renamed close to almostequal (backward compatibility lost).
    * Fixed bug #133: example of assert_sort did not work.
 -- Michael Baudin   September 2010

assert (0.1)
    * Initial version
 -- Michael Baudin   August 2010

[215.46 kB]
OS-independent binary for Scilab 5.2.x
Binary version
Automatically generated by the ATOMS compilation chain

News (0)
Comments (0)
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.