source: branches/replacing_gnuplot/test/Suite.h @ 845

Last change on this file since 845 was 845, checked in by Jari Häkkinen, 14 years ago

Merged trunk changes -r782:844 to replacing_gnuplot branch.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1#ifndef _theplu_svndigest_test_suite_
2#define _theplu_svndigest_test_suite_
3
4// $Id: Suite.h 845 2009-11-16 22:27:19Z jari $
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
29namespace theplu {
30namespace svndigest {
31  class Stats;
32  class StatsCollection;
33
34namespace test {
35
36  class Suite
37  {
38  public:
39    Suite(int argc, char* argv[], bool need_test_repo=false);
40    ~Suite(void);
41
42    /**
43       If b is false, set ok to false
44
45       \return b
46    */
47    bool add(bool b);
48
49    /**
50       \return true if all tests are OK
51     */
52    bool ok(void) const;
53
54    std::ostream& out(void) const;
55
56    /**
57       \return true if we are running in verbose mode
58     */
59    bool verbose(void) const;
60
61  private:
62    std::ofstream* dev_null_;
63    bool ok_;
64    bool verbose_;
65
66    void checkout_test_wc(void) const;
67    void update_test_wc(void) const;
68  };
69
70  bool check_all(const Stats&, test::Suite&);
71  bool check_total(const Stats&, test::Suite&);
72  bool check_comment_or_copy(const Stats&, test::Suite&);
73
74  bool consistent(const StatsCollection&, test::Suite&);
75  bool consistent(const Stats&, test::Suite&);
76
77  bool equal(const StatsCollection& a, const StatsCollection& b, 
78             test::Suite& suite);
79
80  bool equal(const Stats& a, const Stats& b, test::Suite& suite);
81
82  /**
83     \return absolute path to file
84     \param local_path path relative to builddir
85   */
86  std::string filename(const std::string& local_path);
87
88  /**
89     \return absolute path to file
90     \param path path relative to srcdir
91   */
92  std::string src_filename(const std::string& path);
93}}}
94
95#endif
Note: See TracBrowser for help on using the repository browser.