1 | #ifndef _theplu_svndigest_test_suite_ |
---|
2 | #define _theplu_svndigest_test_suite_ |
---|
3 | |
---|
4 | // $Id: Suite.h 744 2009-01-08 22:37:12Z peter $ |
---|
5 | |
---|
6 | /* |
---|
7 | Copyright (C) 2008, 2009 Peter Johansson |
---|
8 | |
---|
9 | This file is part of svndigest, http://dev.thep.lu.se/svndigest |
---|
10 | |
---|
11 | svndigest is free software; you can redistribute it and/or modify it |
---|
12 | under the terms of the GNU General Public License as published by |
---|
13 | the Free Software Foundation; either version 3 of the License, or |
---|
14 | (at your option) any later version. |
---|
15 | |
---|
16 | svndigest distributed in the hope that it will be useful, but |
---|
17 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
19 | General Public License for more details. |
---|
20 | |
---|
21 | You should have received a copy of the GNU General Public License |
---|
22 | along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
---|
23 | */ |
---|
24 | |
---|
25 | #include "environment.h" |
---|
26 | |
---|
27 | #include <string> |
---|
28 | |
---|
29 | namespace theplu { |
---|
30 | namespace svndigest { |
---|
31 | namespace test { |
---|
32 | |
---|
33 | class Suite |
---|
34 | { |
---|
35 | public: |
---|
36 | Suite(int argc, char* argv[], bool need_test_repo=false); |
---|
37 | ~Suite(void); |
---|
38 | |
---|
39 | /** |
---|
40 | If b is false, set ok to false |
---|
41 | |
---|
42 | \return b |
---|
43 | */ |
---|
44 | bool add(bool b); |
---|
45 | |
---|
46 | /** |
---|
47 | \return true if all tests are OK |
---|
48 | */ |
---|
49 | bool ok(void) const; |
---|
50 | |
---|
51 | std::ostream& out(void) const; |
---|
52 | |
---|
53 | /** |
---|
54 | \return true if we are running in verbose mode |
---|
55 | */ |
---|
56 | bool verbose(void) const; |
---|
57 | |
---|
58 | private: |
---|
59 | std::ofstream* dev_null_; |
---|
60 | bool ok_; |
---|
61 | bool verbose_; |
---|
62 | |
---|
63 | void checkout_test_wc(void) const; |
---|
64 | void update_test_wc(void) const; |
---|
65 | }; |
---|
66 | |
---|
67 | /** |
---|
68 | \return absolute path to file |
---|
69 | \param local_path path relative to srcdir |
---|
70 | */ |
---|
71 | std::string filename(const std::string& local_path); |
---|
72 | |
---|
73 | }}} |
---|
74 | |
---|
75 | #endif |
---|