summaryrefslogtreecommitdiff
path: root/test/libapt/assert.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-10-05 22:45:22 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-10-05 22:45:22 +0200
commit7cb28948317e0d326c8663ec3c9ce995d5bf65e8 (patch)
tree42df84085ed6eaa11a035ae731a6ee545e2687ea /test/libapt/assert.h
parent0fffbc8ce4cb6357f59db63db5571f46a668a66b (diff)
* apt-pkg/deb/debmetaindex.cc:
- none is a separator, not a language: no need for Index (Closes: #624218) * apt-pkg/aptconfiguration.cc: - do not builtin languages only if none is forced (Closes: #643787)
Diffstat (limited to 'test/libapt/assert.h')
-rw-r--r--test/libapt/assert.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libapt/assert.h b/test/libapt/assert.h
index fae9b6c64..ce5accc1c 100644
--- a/test/libapt/assert.h
+++ b/test/libapt/assert.h
@@ -54,6 +54,21 @@ void assertEqualsOr2(int const &expect1, int const &expect2, unsigned int const
}
+#define equalsOr3(w,x,y,z) assertEqualsOr3(x, y, z, w, __LINE__)
+
+template < typename X, typename Y >
+void OutputAssertEqualOr3(X expect1, X expect2, X expect3, char const* compare, Y get, unsigned long const &line) {
+ std::cerr << "Test FAILED: »" << expect1 << "« or »" << expect2 << "« or »" << expect3 << "« " << compare << " »" << get << "« at line " << line << std::endl;
+}
+
+template < typename X, typename Y >
+void assertEqualsOr3(X expect1, X expect2, X expect3, Y get, unsigned long const &line) {
+ if (expect1 == get || expect2 == get || expect3 == get)
+ return;
+ OutputAssertEqualOr3(expect1, expect2, expect3, "==", get, line);
+}
+
+
// simple helper to quickly output a vectors
template < typename X >
void dumpVector(X vec) {