[GenABEL-dev] [Genabel-commits] r923 - in branches/ProbABEL-refactoring/ProbABEL/examples: . test_other

L.C. Karssen lennart at karssen.org
Wed Jun 20 20:19:09 CEST 2012


Indeed, the diffs are a way to test for regressions in the code.
I have to admit I haven't really ever used cppunit (or any kind of unit
tests), although I am somewhat familiar with the concept.
Another reason to start learning more about unit testing, I guess.

However, I wonder if we can (after implementing unit tests) really get
rid of all diffs in the tests. Comparing to 'known good' R results, for
example works well to detect bugs, I'd say. Furthermore, it may help to
convince people everything works as intended.

In the present autoconf/automake setup 'make test' checks all the diff
scripts we have. Running the unit tests could be integrated there too.
As documented in doc/INSTALL 'make distcheck' (which also runs 'make
check' should be run before releasing tar-balls. That seems to work well.

A note on build dependencies: adding cppunit-based tests will require
that people who compile ProbABEL themselves will need the cppunit
libraries installed. On a modern linux system with package management
that shouldn't be a problem though. Already we offer pre-built packages
for Windows and Ubuntu. Hopefully someone will be able to create RPM
packages as well...
Anyway, we could try to detect the presence of the ccpunit libraries
when running ./configure and use the outcome to take action (somehow) in
the make process.
Actually, the same holds when thinking about using the GSL (GNU
scientific library) within ProbABEL.

All in all, I think we should add more unit tests as we continue to work
on ProbABEL (and other ABELs), but I don't think we'll get rid of the
diff scripts any time soon.



Lennart.

On 20/06/12 00:15, Yurii Aulchenko wrote:
> I remember that this "diff" thing was introduced to have "regression
> tests" and verify that we have correct outputs after modifying the
> code.
> 
> I wonder if using cunit/cppunit (Unit testing in C/C++) framework may
> be a good idea to do both regression and other types of tests?
> 
> This framework was used when developing "filevector" (R front-end of
> this is DatABEL; see
> https://r-forge.r-project.org/scm/viewvc.php/pkg/filevector/tests/?root=genabel).
> 
> What do you think, guys?
> 
> On Tue, Jun 19, 2012 at 8:01 PM,  <noreply at r-forge.r-project.org> wrote:
>> Author: maarten
>> Date: 2012-06-19 20:01:23 +0200 (Tue, 19 Jun 2012)
>> New Revision: 923
>>
>> Added:
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/allheight.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/coxph_data.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_allcov_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_allcov_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_base_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_base_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_int1_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_int1_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_fv_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_fv_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_fv_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_fv_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_allcov_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_fv_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_fv_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_fv_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_fv_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_fv_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_fv_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_fv_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_fv_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_int1_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_fv_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_fv_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_fv_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_fv_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_fv_2df.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_fv_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_fv_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_fv_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_int1_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_over_domin.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_ngp2_robust_recess.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_robust_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_robust_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_robust_int1_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/height_robust_int1_fv_add.out.txt
>>   branches/ProbABEL-refactoring/ProbABEL/examples/test_other/logist_data.txt
>> Log:
>> Add old results of example_all.sh to compare with current version
>>
>>
> _______________________________________________
> genabel-devel mailing list
> genabel-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel

-- 
-----------------------------------------------------------------
L.C. Karssen
Utrecht
The Netherlands

lennart at karssen.org
http://blog.karssen.org

Stuur mij aub geen Word of Powerpoint bestanden!
Zie http://www.gnu.org/philosophy/no-word-attachments.nl.html
------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20120620/1ce52d77/attachment.sig>


More information about the genabel-devel mailing list