Commit 836fd954 by Szeberényi Imre

EXPECT_ pred param fix

parent 73715af9
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define GTEST_LITE_H #define GTEST_LITE_H
/** /**
* \file gtest_lite.h (v4/2022) * \file gtest_lite.h (v5/2024)
* *
* Google gtest keretrendszerhez hasonló rendszer. * Google gtest keretrendszerhez hasonló rendszer.
* Sz.I. 2015., 2016., 2017. (_Has_X) * Sz.I. 2015., 2016., 2017. (_Has_X)
...@@ -343,7 +343,7 @@ static Test& test = Test::getTest(); ...@@ -343,7 +343,7 @@ static Test& test = Test::getTest();
/// általános sablon a várt értékhez. /// általános sablon a várt értékhez.
template <typename T1, typename T2> template <typename T1, typename T2>
std::ostream& EXPECT_(T1 exp, T2 act, bool (*pred)(T1, T1), const char *file, int line, std::ostream& EXPECT_(T1 exp, T2 act, bool (*pred)(T1, T2), const char *file, int line,
const char *expr, const char *lhs = "elvart", const char *rhs = "aktual") { const char *expr, const char *lhs = "elvart", const char *rhs = "aktual") {
return test.expect(pred(exp, act), file, line, expr) return test.expect(pred(exp, act), file, line, expr)
<< "** " << lhs << ": " << std::boolalpha << exp << "** " << lhs << ": " << std::boolalpha << exp
...@@ -352,7 +352,7 @@ std::ostream& EXPECT_(T1 exp, T2 act, bool (*pred)(T1, T1), const char *file, in ...@@ -352,7 +352,7 @@ std::ostream& EXPECT_(T1 exp, T2 act, bool (*pred)(T1, T1), const char *file, in
/// pointerre specializált sablon a várt értékhez. /// pointerre specializált sablon a várt értékhez.
template <typename T1, typename T2> template <typename T1, typename T2>
std::ostream& EXPECT_(T1* exp, T2* act, bool (*pred)(T1*, T2*), const char *file, int line, std::ostream& EXPECT_(T1* exp, T2* act, bool (*pred)(T1*, T1*), const char *file, int line,
const char *expr, const char *lhs = "elvart", const char *rhs = "aktual") { const char *expr, const char *lhs = "elvart", const char *rhs = "aktual") {
return test.expect(pred(exp, act), file, line, expr) return test.expect(pred(exp, act), file, line, expr)
<< "** " << lhs << ": " << (void*) exp << "** " << lhs << ": " << (void*) exp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment