Revision 8:3019cb6b538d Test.h
| Test.h | ||
|---|---|---|
| 48 | 48 |
{
|
| 49 | 49 |
public: |
| 50 | 50 |
virtual ~Test(); |
| 51 |
|
|
| 52 |
enum Option {
|
|
| 53 |
NoOption = 0x0, |
|
| 54 |
NonDeterministic = 0x1, |
|
| 55 |
Verbose = 0x2 |
|
| 56 |
}; |
|
| 57 |
typedef int Options; |
|
| 51 | 58 |
|
| 52 | 59 |
class Result {
|
| 53 | 60 |
|
| 54 | 61 |
public: |
| 55 | 62 |
enum Code { Success, Note, Warning, Error };
|
| 56 | 63 |
|
| 64 |
Result() : m_code(Success) { }
|
|
| 57 | 65 |
Result(Code c, std::string m) : m_code(c), m_message(m) { }
|
| 58 | 66 |
|
| 59 | 67 |
Code code() const { return m_code; }
|
| 60 | 68 |
std::string message() const { return m_message; }
|
| 61 |
|
|
| 69 |
|
|
| 62 | 70 |
protected: |
| 63 | 71 |
Code m_code; |
| 64 | 72 |
std::string m_message; |
| ... | ... | |
| 74 | 82 |
class FailedToLoadPlugin { };
|
| 75 | 83 |
|
| 76 | 84 |
// may throw FailedToLoadPlugin |
| 77 |
virtual Results test(std::string key) = 0; |
|
| 85 |
virtual Results test(std::string key, Options) = 0;
|
|
| 78 | 86 |
|
| 79 | 87 |
protected: |
| 80 | 88 |
Test(); |
Also available in: Unified diff