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

Assert

A collection of predicate functions
(15054 downloads for this version - 19240 downloads for all versions)
Details
Version
1.3
Author
Michael Baudin
Owner Organization
DIGITEO
Maintainers
Michael BAUDIN
Allan CORNET
Categories
License
Creation Date
April 13, 2011
Source created on
Scilab 5.2.x
Binaries available on
Scilab 5.4.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Scilab 5.5.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Scilab 6.0.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("assert")
Description
            Purpose
----

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 equal",
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

Features
--------

The following is a list of the current assert functions :
 * assert_checkalmostequal : Check that computed and expected are numerically
close.
 * 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
result.
 * assert_cond2reltol : Suggests a relative error, computed from the condition
number.
 * 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 (4)
[193.67 kB]
Source code archive

[328.65 kB]
OS-independent binary for Scilab 5.4.x
Binary version (all platforms)
Automatically generated by the ATOMS compilation chain

[328.64 kB]
OS-independent binary for Scilab 5.5.x
Binary version (all platforms)
Automatically generated by the ATOMS compilation chain

[369.92 kB]
OS-independent binary for Scilab 6.0.x
Binary version (all platforms)
Automatically generated by the ATOMS compilation chain

News (0)
Comments (6)     Leave a comment 
Comment -- April 13, 2011, 02:29:31 PM    
Here are the changes for version 1.3.

assert (1.3)
    * Fixed ticket #349: The assert_checkequal function did 
      not manage complex doubles.
	* Back-ported the changes from Scilab/master/assert_checkerror.
	* Removed automatically generated demos.
	* Back-ported the localization changes from Scilab/master (error messages).
Comment -- April 14, 2011, 11:06:10 AM    
The version 1.3 works fine on Windows 32 bits:


-->atomsTest("assert")
   TMPDIR = C:\Users\baudin\AppData\Local\Temp\SCI_TMP_11616_

   001/018 - [SCI\contrib\assert\1.3-1] checkalmostequal...........passed 
   002/018 - [SCI\contrib\assert\1.3-1] checkequal.................passed 
   003/018 - [SCI\contrib\assert\1.3-1] checkerror.................passed 
   004/018 - [SCI\contrib\assert\1.3-1] checkfalse.................passed 
   005/018 - [SCI\contrib\assert\1.3-1] checkfilesequal............passed 
   006/018 - [SCI\contrib\assert\1.3-1] checktrue..................passed 
   007/018 - [SCI\contrib\assert\1.3-1] compare....................passed 
   008/018 - [SCI\contrib\assert\1.3-1] comparecomplex.............passed 
   009/018 - [SCI\contrib\assert\1.3-1] computedigits..............passed 
   010/018 - [SCI\contrib\assert\1.3-1] cond2reltol................passed 
   011/018 - [SCI\contrib\assert\1.3-1] cond2reqdigits.............passed 
   012/018 - [SCI\contrib\assert\1.3-1] csvread....................passed 
   013/018 - [SCI\contrib\assert\1.3-1] csvwrite...................passed 
   014/018 - [SCI\contrib\assert\1.3-1] expandvar..................passed 
   015/018 - [SCI\contrib\assert\1.3-1] generror...................passed 
   016/018 - [SCI\contrib\assert\1.3-1] sort.......................passed 
   017/018 - [SCI\contrib\assert\1.3-1] sortcomplex................passed 
   018/018 - [SCI\contrib\assert\1.3-1] sortgraph..................passed 
Comment -- April 14, 2011, 12:00:59 PM    
Most tests pass on Linux (with a minor problem: 3 tests fail, because of portability issues

in the tests). The functions of the v1.3 are working fine on Linux.
Comment from Michael BAUDIN -- February 27, 2016, 11:40:04 AM    
This module as no utility anymore, since the assert module is now in Scilab 5. 
Users should not rely on it anymore. 
Comment from Michael BAUDIN -- February 27, 2016, 11:42:08 AM    
This module as no utility anymore, since the assert module is now in Scilab 5. 
Users should not rely on it anymore. 
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.