4 #include "../xdelta3.h"
5 #include "../xdelta3-internal.h"
12 #define CHECK_EQ(x,y) CHECK_OP(x,y,==)
13 #define CHECK_NE(x,y) CHECK_OP(x,y,!=)
14 #define CHECK_LT(x,y) CHECK_OP(x,y,<)
15 #define CHECK_GT(x,y) CHECK_OP(x,y,>)
16 #define CHECK_LE(x,y) CHECK_OP(x,y,<=)
17 #define CHECK_GE(x,y) CHECK_OP(x,y,>=)
19 #define CHECK_OP(x,y,OP) \
24 cerr << __FILE__ << ":" << __LINE__ << " Check failed: " << #x " " #OP " " #y << endl; \
25 cerr << __FILE__ << ":" << __LINE__ << " Expected: " << _x << endl; \
26 cerr << __FILE__ << ":" << __LINE__ << " Actual: " << _y << endl; \
32 cerr << __FILE__ << ":" << __LINE__ << " Check failed: " << #x << endl; \
43 inline string CommandToString(const vector<const char*> &v) {
45 for (size_t i = 1; i < v.size() && v[i] != NULL; i++) {
64 template <typename T, typename U>
65 pair<T, U> make_pair(const T& t, const U& u) {
66 return pair<T, U>(t, u);