16 lines
400 B
C++
16 lines
400 B
C++
#include "if_constexpr.hpp"
|
|||
|
|
#include <gtest/gtest.h>
|
||
|
|
|
||
|
|
TEST(IfConstexpr, TypeName) {
|
||
|
|
EXPECT_STREQ(cpp17::type_name<int>(), "integral");
|
||
|
|
EXPECT_STREQ(cpp17::type_name<double>(), "floating");
|
||
|
|
}
|
||
|
|
|
||
|
|
TEST(IfConstexpr, ElementCount) {
|
||
|
|
EXPECT_EQ(cpp17::element_count(std::vector<int>{1, 2, 3}), 3U);
|
||
|
|
}
|
||
|
|
|
||
|
|
TEST(IfConstexpr, StringifyInts) {
|
||
|
|
EXPECT_EQ(cpp17::stringify_ints({1, 2, 3}), "1,2,3");
|
||
|
|
}
|