[gt-users] Unit tests: test output to file.
Sascha Steinbiss
steinbiss at zbh.uni-hamburg.de
Tue Aug 25 14:19:26 CEST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/22/2009 02:34 PM, Giorgio Gonnella wrote:
> Hi,
Hey Giorgio,
> In the unit test I would like to test that the information is written
> as it should be and - as I also have a parser method - that showing
> followed by parsing returns an equivalent to the original object. How
> do you test such cases? Is it allowed to print to a file during tests
> and delete it afterwards? And if yes, where should the file be
> located?
Yes, we (I do, to be exact ;)) also create temporary input files in test
cases (see unit test in core/sequence_buffer.c for an example). You can
use gt_xtmpfp() from the fa module to create temporary files and
gt_xremove from the xansi module to delete them.
> Giorgio
Sascha
- --
Sascha Steinbiss
Center for Bioinformatics
University of Hamburg
Bundesstr. 43
20146 Hamburg
Germany
Email: steinbiss at zbh.uni-hamburg.de
URL: http://www.zbh.uni-hamburg.de/steinbiss
Phone: +49 (40) 42838 7322
FAX: +49 (40) 42838 7312
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqT1soACgkQvCCdOseRus8EtQCfYnx6hJgBSH3l6/obbVy7Dbwj
z9wAnjlbT88ZvU5Gqej6WWFTvY8EhmLc
=7lhR
-----END PGP SIGNATURE-----
More information about the gt-users
mailing list