2nd part of the project – testing at the function level

August 2, 2010 at 12:31 am | Posted in Uncategorized | Leave a comment

I must say it was very hard for me at the beginning to determine what functions are more important and what are less but over time I started to recognize that. I will use the Boost Test Library for unit testing, for organizing tests CTest form CMake would be better because the first part of this project was based on it. Why Boost Test Library?

  • it is rather mature and stable
  • it has many information and examples of its usage
  • it has all the options needed for automatic testing
  • it has many additional options which might be used in future tests development
  • almost everyone have boost library already in their computer, so no additional installations are needed

more info about BTL : http://www.boost.org/doc/libs/1_34_0/libs/test/doc/index.html

Now some more about the tests. Here is a list I made myself for marking the priority of the testing files in libpano (the more ‘+’ the more it is important to test):

  • adjust.c                +++
  • bmp.c                    +
  • ColourBrightness.c+++
  • correct.c            ++
  • dump.c                +
  • fftn.c                +
  • file.c                ++
  • filter.c                ++++
  • fourier.c            +
  • hdrfile.c            +
  • javastub.c            +
  • jpeg.c                +
  • jpegicc.c            +
  • lmdif.c                +
  • math.c                ++
  • metadata.c            +++
  • morpher.c            +
  • multilayer.c        +
  • optimize.c            +++
  • pan.c                    +
  • PaniniGeneral.c    +
  • parser.c                +
  • perspect.c            +
  • png.c                    +
  • ppm.c                    +
  • PTcommon.c            ++++
  • PTDialogs.c            +
  • pteditor.c            +
  • ptfeather.c            +++
  • ptpicker.c            ++
  • ptstitch.c            +++
  • queryfeature.c        ++
  • remap.c                ++
  • resample.c            ++
  • rgbe.c                +
  • seamer_.c            +
  • seamer.c                +
  • shell_mac.c            +
  • sys_ansi.c            +
  • sys_common.c        +
  • sys_mac.c            +
  • sys_win.c            +
  • sys_X11.c            +
  • tiff.c                +++
  • Triangulate.c        +
  • ZComb.c                +

That is quite a big list but it is almost impossible to test every function from this files fully. So it is important to choice wisely. And now a bit smaller list with functions I will test in the next days (or already started testing):

  • void ColourBrightness(  fullPath *fullPathImages, fullPath *outFullPathImages, int counterImages, int indexReferenceImage, int parm3,int createCurvesType)
  • void CorrectImageColourBrigthness(Image *image, magnolia_struct *magnolia, int parm3)
  • void filter( TrformStr *TrPtr, flfn func, flfn16 func16, void* params, int color)
  • int panoCroppingMain(int argc,char *argv[], int operation, char *version, char *usage, char *defaultPrefix)
  • int CropImage(Image *im, PTRect *r)
  • int readJPEG ( Image *im, fullPath *sfile )
  • int writeJPEG ( Image *im, fullPath *sfile,     int quality, int progressive )
  • int readTIFF ( Image *im, fullPath *sfile )
  • int writeTIFF ( Image *im, fullPath *fname)
  • int writeHDR ( Image *im, fullPath *sfile )
  • int readHDR ( Image *im, fullPath *sfile )
  • int blendImages ( fullPath *f0,  fullPath *f1, fullPath *result, double s )
  • int panoTiffDisplayInfo(char *fileName)
  • int panoCreatePanorama(fullPath ptrImageFileNames[], int counterImageFiles, fullPath * panoFileName, fullPath * scriptFileName)
  • void  RunLMOptimizer( OptInfo    *o)
  • int panoFlattenTIFF(fullPath *fullPathImages, int counterImageFiles, fullPath *outputFileName, int removeOriginals);
  • int panoPSDCreate(fullPath * fullPathImages, int numberImages, fullPath * outputFileName, pano_flattening_parms *flatteningParms)

This list isn’t full and might be changed over time.

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: