-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.h
More file actions
45 lines (32 loc) · 933 Bytes
/
Copy pathTest.h
File metadata and controls
45 lines (32 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef TEST_H
#define TEST_H
#include <string>
#include <sstream>
#include <cstring>
#include <iostream>
using namespace std;
class Test {
public:
Test(string name);
string getName();
virtual void run(void) = 0;
int getFailed();
int getPassed();
const std::string getTraceBuffer();
private:
string _name;
int _failed;
int _passed;
bool testFailed();
bool testSuccess();
std::stringstream _traceBuffer;
protected:
bool assertTrue(const bool condition);
bool assertFalse(const bool condition);
bool assertEquals(const string a, const string b);
bool assertEquals(const char* a, const char* b, const int len);
void trace(string data);
void trace(string data, string data1);
void trace(string data, string data1, string data2);
};
#endif /* TEST_H */