#include "catch_tmp.h" #include using namespace tmp; #if defined(__clang__) TEST_CASE("typeName") { REQUIRE("void" == std::string{typeName()}); REQUIRE("int &" == std::string{typeName()}); REQUIRE("int *" == std::string{typeName()}); REQUIRE("const int" == std::string{typeName()}); REQUIRE("int *const &" == std::string{typeName()}); } TEST_CASE("strTypes") { REQUIRE("" == strTypes()); REQUIRE("int" == strTypes()); REQUIRE("int" == strTypes<>(0)); REQUIRE("char, int" == strTypes(0)); } #elif defined(__GNUC__) TEST_CASE("typeName") { REQUIRE("void" == std::string{typeName()}); REQUIRE("int&" == std::string{typeName()}); REQUIRE("int*" == std::string{typeName()}); REQUIRE("const int" == std::string{typeName()}); REQUIRE("int* const&" == std::string{typeName()}); } TEST_CASE("strTypes") { REQUIRE("" == strTypes()); REQUIRE("int" == strTypes()); REQUIRE("int" == strTypes<>(0)); REQUIRE("char, int" == strTypes(0)); } #elif defined(__MSC_VER) TEST_CASE("typeName") {} TEST_CASE("strTypes") {} #endif