From c5de72efd46a2f779fda176268b0ccef9e532341 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 4 Nov 2020 11:23:43 +0100 Subject: Allow for comparison of differrent types in assert_equal and pass arguments by reference. --- uunit.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uunit.h b/uunit.h index 447d27a..f11fa1c 100644 --- a/uunit.h +++ b/uunit.h @@ -206,8 +206,9 @@ protected: throw test_result{"", file, line, ss.str()}; } } - template - void assert_equal(T expected, T value, + + template + void assert_equal(const T& expected, const U& value, const char* file, std::size_t line) { if(expected != value) -- cgit v1.2.3