<HTML> <HEAD> <!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 --> <LINK rel="stylesheet" href="ciao.css" type="text/css"> <TITLE>The Ciao Prolog System - Automatic modules caller tester</TITLE> </HEAD> <BODY> Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_227.html">previous</A>, <A HREF="ciao_229.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC886" HREF="ciao_toc.html#TOC886">Automatic modules caller tester</A></H1> <P> <A NAME="IDX9784"></A> <P> <STRONG>Author(s):</STRONG> David Trallero Mena. <P> <STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST) <P> <STRONG>Version of last change:</STRONG> 1.0#6 (2004/2/24, 17:12:13 CET) <P> This module is intended to agilizy the work of calling several modules as prove cases of some program. Usually when you are developing a program you have several auto-test program cases that you would like to execute whenever you do some modification in your program/system. The predicate <A NAME="IDX9785"></A> <CODE>mod_tester/2</CODE> was created with the propouse of execute this test an report to you which of them were correctly executed and which one were not. <UL> <LI><A HREF="ciao_228.html#SEC887">Usage and interface (modtester)</A> <LI><A HREF="ciao_228.html#SEC888">Documentation on exports (modtester)</A> </UL> <H2><A NAME="SEC887" HREF="ciao_toc.html#TOC887">Usage and interface (<CODE>modtester</CODE>)</A></H2> <div class="cartouche"> <UL> <LI><STRONG>Library usage:</STRONG> <CODE>:- use_module(library(modtester)).</CODE> <LI><STRONG>Exports:</STRONG> <UL> <LI><EM>Predicates:</EM> <A NAME="IDX9786"></A> <CODE>tester_func/1</CODE>, <A NAME="IDX9787"></A> <CODE>modules_tester/2</CODE>, <A NAME="IDX9788"></A> <CODE>pred_tester/2</CODE>. </UL> <LI><STRONG>Other modules used:</STRONG> <UL> <LI><EM>System library modules:</EM> <A NAME="IDX9789"></A> <CODE>tester/tester</CODE>, <A NAME="IDX9790"></A> <CODE>lists</CODE>, <A NAME="IDX9791"></A> <CODE>write</CODE>, <A NAME="IDX9792"></A> <CODE>filenames</CODE>, <A NAME="IDX9793"></A> <CODE>compiler/compiler</CODE>, <A NAME="IDX9794"></A> <CODE>terms_check</CODE>, <A NAME="IDX9795"></A> <CODE>conc_aggregates</CODE>, <A NAME="IDX9796"></A> <CODE>system</CODE>. </UL> </UL> </div class="cartouche"> <H2><A NAME="SEC888" HREF="ciao_toc.html#TOC888">Documentation on exports (<CODE>modtester</CODE>)</A></H2> <P> <A NAME="IDX9797"></A> <A NAME="IDX9798"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>tester_func/1:</B> <DD><A NAME="IDX9799"></A> <P> No further documentation available for this predicate. </DL> <P> <A NAME="IDX9800"></A> <A NAME="IDX9801"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>modules_tester/2:</B> <DD><A NAME="IDX9802"></A> <P> <STRONG>Usage 1:</STRONG> <CODE>modules_tester(BaseName, ModulesList)</CODE> <UL> <LI><EM>Description:</EM> modules_tester accepts an atom as basename of the two generated files. For each module in <CODE>ModulesList</CODE> an output and report is saved in 'basename_test_output.log' and 'basename_test_summary.log' respectevely <LI><EM>The following properties should hold at call time:</EM> <CODE>BaseName</CODE> is currently instantiated to an atom. (<CODE>term_typing:atom/1</CODE>) <CODE>ModulesList</CODE> is a list. (<CODE>basic_props:list/1</CODE>) </UL> <P> <STRONG>Usage 2:</STRONG> <CODE>modules_tester(BaseName, PredList)</CODE> <UL> <LI><EM>Description:</EM> pred_tester accepts an atom as basename of the two generated files. For each element with the pattern (FindPatter, precidate, [results]), module in <CODE>PredList</CODE> an output and report is saved in 'basename_test_output.log' and 'basename_test_summary.log' respectevely. For example, you can call this predicate as: pred_tester( test , [(X,mypred(X),[1,2,3]),( (X,Y),mypred2( X, aa , Y ), [(1,2),(2,3)])] ). <LI><EM>The following properties should hold at call time:</EM> <CODE>BaseName</CODE> is currently instantiated to an atom. (<CODE>term_typing:atom/1</CODE>) <CODE>PredList</CODE> is a list. (<CODE>basic_props:list/1</CODE>) </UL> </DL> <P> <A NAME="IDX9803"></A> <A NAME="IDX9804"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>pred_tester/2:</B> <DD><A NAME="IDX9805"></A> <P> No further documentation available for this predicate. </DL> <P><HR><P> Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_227.html">previous</A>, <A HREF="ciao_229.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>. </BODY> </HTML>