X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/527df5a20dbe8ce98fcbf1ffe28bb37ff2257a97..e39698a485e332742b935292dc4329abf19cbb53:/test/libapt/assert.h diff --git a/test/libapt/assert.h b/test/libapt/assert.h index fdf6740c6..357801592 100644 --- a/test/libapt/assert.h +++ b/test/libapt/assert.h @@ -1,11 +1,20 @@ #include +#include + +#include + +#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); } template < typename X, typename Y > @@ -109,3 +118,7 @@ void dumpVector(X vec) { v != vec.end(); ++v) std::cout << *v << std::endl; } + +#if __GNUC__ >= 4 + #pragma GCC diagnostic pop +#endif