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


A collection of predicate functions
(1265 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
December 22, 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 functions to make testing easier. 
We emphasize the use of consistent tools for testing 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 check that two numbers are "numerically almost
i.e. that the relative error is small.

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

The functions allows to:
 * assert for true, equal statements,
 * assert that two floating point numbers are "close" (using a relative or
absolute tolerance).

Additionnaly, we can sort doubles complex numbers with a mixed relative/absolute
tolerance criteria.

The toolbox is based on macros.

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

help assert_overview


The following is a list of the current assert functions :
 * assert_checkalmostequal : Check that computed and expected are numerically
 * assert_checkequal : Check that computed and expected are equal.
 * assert_checktrue : Check that condition is true.
 * assert_checkfalse : Check that condition is false.
 * assert_checkfilesequal : Check two files are equal.
 * assert_checkerror : Check that the function has produced the correct error.
 * assert_generror : Generates an error.

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.

and support functions :
 * assert_computedigits : Returns the number of significant digits in computed
 * assert_cond2reltol : Suggests a relative error, computed from the condition
 * assert_cond2reqdigits : Suggests the number of required digits, given the
condition number.
 * assert_csvread : Read data from a file or a string.
 * assert_csvwrite : Write data into a file or a string.

Files (2)
[218.61 kB]
Source code archive

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

News (0)
Comments (5)     Leave a comment 
[get_person] Le compte avec l'identifiant 2125 n'existe pas