summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-03-06 00:33:10 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-03-13 13:58:45 +0100
commita02db58fd50ef7fc2f0284852c6b3f98e458a232 (patch)
treeecb7b4ad3252064381414d39782a2e4222368843 /test
parent453b82a388013e522b3a1b9fcd6ed0810dab1f4f (diff)
follow method attribute suggestions by gcc
Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
Diffstat (limited to 'test')
-rw-r--r--test/libapt/assert.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/libapt/assert.h b/test/libapt/assert.h
index cde6a6351..357801592 100644
--- a/test/libapt/assert.h
+++ b/test/libapt/assert.h
@@ -1,6 +1,8 @@
#include <iostream>
#include <cstdlib>
+#include <apt-pkg/macros.h>
+
#if __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-declarations"
@@ -10,7 +12,7 @@
#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);
}