]>
git.saurik.com Git - apt.git/blob - test/libapt/assert.h
3 #define equals(x,y) assertEquals(x, y, __LINE__)
5 template < typename X
, typename Y
>
6 void OutputAssert(X expect
, char const* compare
, Y get
, unsigned long const &line
) {
7 std::cerr
<< "Test FAILED: »" << expect
<< "« " << compare
<< " »" << get
<< "« at line " << line
<< std::endl
;
10 template < typename X
, typename Y
>
11 void assertEquals(X expect
, Y get
, unsigned long const &line
) {
14 OutputAssert(expect
, "==", get
, line
);
17 void assertEquals(unsigned int const &expect
, int const &get
, unsigned long const &line
) {
19 OutputAssert(expect
, "==", get
, line
);
20 assertEquals
<unsigned int const&, unsigned int const&>(expect
, get
, line
);