Re: [eclipse-clp-users] Possible to flush all rules and assertions from EmbeddedEclipse to run successive unit tests?

From: Joachim Schimpf <joachim.schimpf_at_monash.edu>
Date: Fri, 17 Dec 2010 14:03:08 +1100
-dp- wrote:
> I have been using EmbeddedEclipse with queues to run one unit test at a
> time via Java. This has worked fine because I can define in the unit
> test which ECL files to compile, what query to make, and what result the
> query should return.
> 
> However, I'd now like to run one unit test after another. That means
> that after running one, I would need a way to flush all compiled rules
> and any assertions before compiling new ones. But there is nothing in
> the EmbeddedEclipse API that permits such flushing.

The way to do this is to run your tests inside a module, and then
erase and re-create that module before the next test, using
http://eclipseclp.org/doc/bips/kernel/modules/erase_module-1.html
http://eclipseclp.org/doc/bips/kernel/modules/create_module-1.html

Goals called from Java are executed in a default module (see the
defaultModule setting in EclipseEngineOptions).  So you can either
change that, or use call(Goal)@test_module to run your test in
a particular module.


-- Joachim
Received on Fri Dec 17 2010 - 03:03:20 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET