[Israel.pm] Freecell Solver's Test Suite + Conversion to CMake

Shlomi Fish shlomif at iglu.org.il
Thu Jul 31 03:27:04 PDT 2008

Hi all!

(All the lists should have a reply-to, so please only reply-to one list).

I recently resumed work on Freecell Solver (FCS) somewhat more intensively. 
Having gotten tired of Autoconf/Automake/Libtool (a.k.a Autohell), I decided 
to convert to CMake ( http://www.cmake.org/ ) for its configuration stage. 
However, since FCS lacked automated tests, I was afraid that by the 
conversion I would break something. (It's kinda paranoid, but still).

As a result, I started working on a test suite. The first tests I wrote were C 
files generated by Perl and Template toolkit to test the card input/output. 
It was a start but not enough.

Then I started working on http://fc-solve.berlios.de/verify-code/ , which is a 
Perl CPAN module to verify solutions of Freecell-like games. At first, it 
could only do Freecell, but was eventually made more generic and can now 
solve many other variants. It is primarily intended for Freecell Solver, but 
is generic enough to be of use for other solvers.

Using it, I added tests that verify the entire solutions of about 10 deals and 
configurations of various games. Afterwards, I also made sure that the exact 
output of the tests remain the same (an output regression) by keeping track 
of the SHA-256 hash of the solution.

Then I came to what I wanted - CMake. I began converting FCS to CMake here:


It's naturally a long process, because CMake is not backwards compatible with 
the GNU Autotools (and for a good reason, because they are very quirky), but 
I've been making progress. Hopefully, I can make use of my experience with 
converting FCS to CMake in working on http://thewml.org/ .

I should also note that someone I met on IRC expressed interest in 
contributing to FCS. However, he hasn't even played Freecell yet, so it may 
take some time, until he actually contributes.


	Shlomi Fish

Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://xrl.us/bjn8s

I met a guy in the bar, talked to her and she gave me her phone number.

More information about the Perl mailing list