From 2fa496381aa79b22699af4d47a62cd0cdc5448ab Mon Sep 17 00:00:00 2001 From: Neargye Date: Tue, 28 Aug 2018 19:11:36 +0500 Subject: [PATCH] fix build --- test/test.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/test.cpp b/test/test.cpp index b3c2df3..84c5333 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -42,8 +42,8 @@ void SomeMethod3() { } template -T SomeMethod4(U value) { - return T{}; +std::string SomeMethod4(U value) { + return std::string(NAMEOF(SomeMethod4)).append("<").append(NAMEOF_TYPE_T(T)).append(", ").append(NAMEOF_TYPE_T(U)).append(">(").append(NAMEOF_TYPE_T(U)).append(" value)"); } template @@ -273,9 +273,9 @@ TEST_CASE("NAMEOF_TYPE") { #if defined(__clang__) REQUIRE(NAMEOF_TYPE(struct_var) == "SomeStruct"); REQUIRE(NAMEOF_TYPE(ptr_s) == "SomeStruct *"); - REQUIRE(NAMEOF_TYPE(refvar) == "SomeStruct &"); + REQUIRE(NAMEOF_TYPE(ref_s) == "SomeStruct &"); - REQUIRE(NAMEOF_TYPE(classvar) == "const volatile SomeClass *"); + REQUIRE(NAMEOF_TYPE(ptr_c) == "const volatile SomeClass *"); REQUIRE(NAMEOF_TYPE(othervar) == "Long"); REQUIRE(NAMEOF_TYPE(othervar.ll) == "Long::LL"); @@ -301,9 +301,9 @@ TEST_CASE("NAMEOF_TYPE") { #elif defined(__GNUC__) REQUIRE(NAMEOF_TYPE(struct_var) == "SomeStruct"); REQUIRE(NAMEOF_TYPE(ptr_s) == "SomeStruct*"); - REQUIRE(NAMEOF_TYPE(refvar) == "SomeStruct&"); + REQUIRE(NAMEOF_TYPE(ref_s) == "SomeStruct&"); - REQUIRE(NAMEOF_TYPE(classvar) == "const volatile SomeClass*"); + REQUIRE(NAMEOF_TYPE(ptr_c) == "const volatile SomeClass*"); REQUIRE(NAMEOF_TYPE(othervar) == "Long"); REQUIRE(NAMEOF_TYPE(othervar.ll) == "Long::LL"); @@ -319,7 +319,7 @@ TEST_CASE("NAMEOF_TYPE_T") { #if defined(__clang__) REQUIRE(NAMEOF_TYPE_T(decltype(struct_var)) == "SomeStruct"); REQUIRE(NAMEOF_TYPE_T(decltype(ptr_s)) == "SomeStruct *"); - REQUIRE(NAMEOF_TYPE_T(decltype(refvar)) == "SomeStruct &"); + REQUIRE(NAMEOF_TYPE_T(decltype(ref_s)) == "SomeStruct &"); REQUIRE(NAMEOF_TYPE_T(SomeStruct) == "SomeStruct"); REQUIRE(NAMEOF_TYPE_T(SomeStruct *) == "SomeStruct *"); REQUIRE(NAMEOF_TYPE_T(SomeStruct &) == "SomeStruct &"); @@ -353,7 +353,7 @@ TEST_CASE("NAMEOF_TYPE_T") { #elif defined(__GNUC__) REQUIRE(NAMEOF_TYPE_T(decltype(struct_var)) == "SomeStruct"); REQUIRE(NAMEOF_TYPE_T(decltype(ptr_s)) == "SomeStruct*"); - REQUIRE(NAMEOF_TYPE_T(decltype(refvar)) == "SomeStruct&"); + REQUIRE(NAMEOF_TYPE_T(decltype(ref_s)) == "SomeStruct&"); REQUIRE(NAMEOF_TYPE_T(SomeStruct) == "SomeStruct"); REQUIRE(NAMEOF_TYPE_T(SomeStruct *) == "SomeStruct*"); REQUIRE(NAMEOF_TYPE_T(SomeStruct &) == "SomeStruct&");