#include #include #include "test.hpp" FIT_TEST_CASE() { FIT_STATIC_TEST_CHECK(fit::identity(10) == 10); FIT_TEST_CHECK(fit::identity(10) == 10); } FIT_TEST_CASE() { int i = 3; FIT_TEST_CHECK(fit::identity(i) == 3); FIT_TEST_CHECK(&fit::identity(i) == &i); static_assert(std::is_lvalue_reference::value, "Not lvalue"); static_assert(!std::is_lvalue_reference::value, "Not rvalue"); } FIT_TEST_CASE() { FIT_TEST_CHECK(std::vector(fit::identity({1, 2, 3})) == std::vector{1, 2, 3}); } FIT_TEST_CASE() { static_assert(fit::is_callable::value, "Identiy callable"); static_assert(!fit::is_callable::value, "Identiy not callable"); static_assert(!fit::is_callable::value, "Identiy not callable"); }