2024-02-27 21:27:05 +00:00
|
|
|
#include <gtest/gtest.h>
|
2024-08-28 08:18:54 +00:00
|
|
|
|
|
|
|
#include <utempl/utempl.hpp>
|
2024-02-27 21:27:05 +00:00
|
|
|
|
|
|
|
namespace utempl {
|
|
|
|
|
|
|
|
TEST(Overloaded, Basic) {
|
2024-07-31 02:19:28 +00:00
|
|
|
constexpr auto f = Overloaded(
|
|
|
|
[](int) {
|
|
|
|
return 1;
|
|
|
|
},
|
|
|
|
[](auto&&) {
|
|
|
|
return 2;
|
|
|
|
});
|
2024-02-27 21:27:05 +00:00
|
|
|
EXPECT_EQ(f(1), 1);
|
|
|
|
EXPECT_EQ(f(""), 2);
|
|
|
|
};
|
|
|
|
|
2024-07-31 02:19:28 +00:00
|
|
|
} // namespace utempl
|