test_format (library)
Author(s): Isabel Martín García.Most of the predicates exported by this module perform some checks to determine whether the arguments attain some conditions or not. In the second case an exception will be thrown. To catch the exceptions you can use the following metapredicates when invoking chartlib exported predicates:
Both metapredicates are defined in the chartlib_errhandle module that comes with this library. Some of the predicates have a Predicate argument which will be used in case of error to show which chartlib predicate causes the error.
Usage and interface
- Library usage:
:- use_module(library(test_format)). - Exports:
- Imports:
Documentation on exports
Test whether the list X and the list Y contain the same number of elements.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)X is a list.
(basic_props:list/1)Y is a list.
(basic_props:callable/1)Predicate is a term which represents a goal, i.e., an atom or a structure.
Tests whether at least one the lists X, Y or Z are empty.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)X is a list.
(basic_props:list/1)Y is a list.
(basic_props:list/1)Z is a list.
(basic_props:callable/1)Predicate is a term which represents a goal, i.e., an atom or a structure.
Tests whether the lists X or Y are empty.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)X is a list.
(basic_props:list/1)Y is a list.
(basic_props:callable/1)Predicate is a term which represents a goal, i.e., an atom or a structure.
Tests if the number of elements in each sublist of List is Number1 or Number2.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)List is a list.
(term_typing:integer/1)Number is currently instantiated to an integer.
(term_typing:integer/1)Number is currently instantiated to an integer.
(basic_props:atm/1)Predicate is an atom.
Tests the following restrictions:
- The XVector number of elements is the same as each YVector sublist number of elements.
- The YVector length is equal to BarsAttributes length.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)XVector is a list.
(basic_props:list/1)YVector is a list.
(basic_props:list/1)BarsAttributes is a list.
(basic_props:callable/1)Predicate is a term which represents a goal, i.e., an atom or a structure.
Tests the following conditions:
- YVectors list and LinesAttributes list have the same number of elements.
- XVector list and each YVectors element have the same number of elements.
- Each sublist of LinesAttributes is composed of 5, 3 or 1 elements.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)XVector is a list.
(basic_props:list/1)YVectors is a list.
(basic_props:list/1)LinesAttributes is a list.
(basic_props:callable/1)Predicate is a term which represents a goal, i.e., an atom or a structure.
Tests the following conditions:
- XVector list, YVectors list and LinesAttributes list have the same number of elements.
- Each sublist of LinesAttributes is composed of 5, 3 or 1 element.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)XVector is a list.
(basic_props:list/1)YVectors is a list.
(basic_props:list/1)LinesAttributes is a list.
(basic_props:callable/1)Predicate is a term which represents a goal, i.e., an atom or a structure.
Check if each BarsAttibuttes element is a list composed of one or four elements.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)BarsAttibuttes is a list.
(basic_props:callable/1)Predicate is a term which represents a goal, i.e., an atom or a structure.
All of the ElementTable sublists have the same number of elements and are not empty.
Usage:
- The following properties should hold at call time:
(basic_props:list/1)ElementTable is a list.
(basic_props:callable/1)Predicate is a term which represents a goal, i.e., an atom or a structure.