00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef SH_CVRSTGFILETEST_H
00022
#define SH_CVRSTGFILETEST_H
00023
00024
#include "BitString.h"
00025
#include "CvrStgFile.h"
00026
00027
#include "UnitTest.h"
00028
#include "TestSuite.h"
00029
00030 class CvrStgFileTest :
public UnitTest {
00031
public:
00032 CvrStgFileTest (std::string n,
TestSuite* s) :
UnitTest(n,s) {} ;
00033
00034
protected:
00040
bool genericTestReadWrite (
const std::string& rfn,
bool new_wfn =
true)
const ;
00041
bool genericTestReadEmbedExtract (
const std::string& fn,
BitString& emb)
const ;
00042
00046
bool genericTestReadExtractCompare (
const std::string& fn,
BitString& emb)
const ;
00047
bool genericTestReadEmbedWriteReadExtract (
const std::string& cvrfn,
BitString& emb)
const ;
00048
bool genericTestPosition (
const CvrStgFile* f,
const SamplePos pos,
SampleValue* sv_r)
const ;
00049
bool genericTestSVALCalculation (
const CvrStgFile* f,
const Graph* g)
const ;
00050
00054
bool genericTestEmbeddedValue (
const CvrStgFile* f)
const ;
00055
00056
private:
00057
bool areEqual (
const std::string& fn1,
const std::string& fn2)
const ;
00058
void removeFile (
const std::string& fn)
const ;
00059
void copyFile (
const std::string& src,
const std::string& dest)
const ;
00060
void moveFile (
const std::string& src,
const std::string& dest)
const ;
00061 } ;
00062
00063
#endif // ndef SH_CVRSTGFILETEST_H