[gt-users] Unit tests: test output to file.
Giorgio Gonnella
ggonnell at yahoo.it
Sat Aug 22 14:34:35 CEST 2009
Hi,
I have written a class (GtOverlap) which has a show method (I called it print, but I saw that methods printing to stdout or file are called show throughout the genometools, so I am going to rename it), that serializes and prints information contained in its member variables of the class struct. I call gt_file_xprintf for that.
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?
Giorgio
More information about the gt-users
mailing list