plunit surprises (mostly good ones)

Ross Boylan <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Organization UCSF
Message-ID <[email protected]>
First, 6.4.1 is now in Debian's git repository (and experimental, I think) thanks to Євгеній Мещеряков aka eugen.  I was able to 
build from source on wheezy and it seems to be working.

Second, while it was building I noticed that it built plunit.  Code with it just works, though even after loading it help(test), for 
example, doesn't give any info.

Third, it seems the test code reads all the facts before any of the tests, which I found suprising.  This may be easier to convey 
with an excerpt:
% lots of stuff omitted
% recover directory of mountpoint
test(mount, [all(x(S, W) = [x(path(['osfirst1']), when(date(2010, 1, 13), seq(30)))])]) :-
	block_for(S, path(['osfirst1', 'home', 'ross']), when(date(2011, 5, 1), seq(10)), W).

succeeded when it was alone.  But when I added the following lines after it:
partition(xda2, xda, when(date(2010, 2, 1), seq(10)), size(500, m)).
mount(xda2, path(['osfirst1', 'home']), when(date(2010, 2, 1), seq(20))).

the test failed, because block_for found the correct answer given those later facts.

I thought prolog just worked its way through the file; if anyone could help me understand that would be great.

Also, I think I'm confused about packages vs modules.  First, how do I find what packages I have available?
Second, I thought the autoload mechanism only applied to modules.

For fuller background see https://bitbucket.org/RossBoylan/disks/commits/1c3f174c0dfe9f543c9bbd91128b76dc6558addc which 
has the configuration the failed (I may do later commits).
_______________________________________________
SWI-Prolog mailing list
[email protected]
https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.