summaryrefslogtreecommitdiff
path: root/test/libapt/assert.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-04-01 12:28:56 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-04-01 12:28:56 +0200
commitbe20eef52da4b7f361333ea70a8d705a98ae779e (patch)
tree4177a110ce6b1335fc4b85d5e53b298a65661f39 /test/libapt/assert.h
parenta555cf8be53d8b5557f004ecbde8482a169b79f3 (diff)
parent21b3eac8f9ab8e12b43fa8998a5aa5465f29adc5 (diff)
Merge remote-tracking branch 'upstream/debian/sid' into feature/apt-manpage
Conflicts: cmdline/apt.cc
Diffstat (limited to 'test/libapt/assert.h')
-rw-r--r--test/libapt/assert.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/libapt/assert.h b/test/libapt/assert.h
index 113c057ed..357801592 100644
--- a/test/libapt/assert.h
+++ b/test/libapt/assert.h
@@ -1,11 +1,18 @@
#include <iostream>
#include <cstdlib>
+#include <apt-pkg/macros.h>
+
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wmissing-declarations"
+#endif
+
#define equals(x,y) assertEquals(y, x, __LINE__)
#define equalsNot(x,y) assertEqualsNot(y, x, __LINE__)
template < typename X, typename Y >
-void OutputAssertEqual(X expect, char const* compare, Y get, unsigned long const &line) {
+APT_NORETURN void OutputAssertEqual(X expect, char const* compare, Y get, unsigned long const &line) {
std::cerr << "Test FAILED: »" << expect << "« " << compare << " »" << get << "« at line " << line << std::endl;
std::exit(EXIT_FAILURE);
}
@@ -111,3 +118,7 @@ void dumpVector(X vec) {
v != vec.end(); ++v)
std::cout << *v << std::endl;
}
+
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic pop
+#endif