steghide  0.5.1
CvrStgFileTest.h
Go to the documentation of this file.
1 /*
2  * steghide 0.5.1 - a steganography program
3  * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  *
19  */
20 
21 #ifndef SH_CVRSTGFILETEST_H
22 #define SH_CVRSTGFILETEST_H
23 
24 #include "BitString.h"
25 #include "CvrStgFile.h"
26 
27 #include "UnitTest.h"
28 #include "TestSuite.h"
29 
30 class CvrStgFileTest : public UnitTest {
31  public:
32  CvrStgFileTest (std::string n, TestSuite* s) : UnitTest(n,s) {} ;
33 
34  protected:
40  bool genericTestReadWrite (const std::string& rfn, bool new_wfn = true) const ;
41  bool genericTestReadEmbedExtract (const std::string& fn, BitString& emb) const ;
42 
46  bool genericTestReadExtractCompare (const std::string& fn, BitString& emb) const ;
47  bool genericTestReadEmbedWriteReadExtract (const std::string& cvrfn, BitString& emb) const ;
48  bool genericTestPosition (const CvrStgFile* f, const SamplePos pos, SampleValue* sv_r) const ;
49  bool genericTestSVALCalculation (const CvrStgFile* f, const Graph* g) const ;
50 
54  bool genericTestEmbeddedValue (const CvrStgFile* f) const ;
55 
56  private:
57  bool areEqual (const std::string& fn1, const std::string& fn2) const ;
58  void removeFile (const std::string& fn) const ;
59  void copyFile (const std::string& src, const std::string& dest) const ;
60  void moveFile (const std::string& src, const std::string& dest) const ;
61 } ;
62 
63 #endif // ndef SH_CVRSTGFILETEST_H