2021-05-27 12:09:57 +00:00
|
|
|
#include <drogon/drogon_test.h>
|
|
|
|
|
|
|
|
namespace api
|
|
|
|
{
|
|
|
|
namespace v1
|
|
|
|
{
|
|
|
|
template <typename T>
|
|
|
|
class handler : public drogon::DrObject<T>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static std::string name()
|
|
|
|
{
|
|
|
|
return handler<T>::classTypeName();
|
|
|
|
}
|
|
|
|
};
|
2023-08-23 03:33:30 +00:00
|
|
|
|
2021-05-27 12:09:57 +00:00
|
|
|
class hh : public handler<hh>
|
|
|
|
{
|
|
|
|
};
|
|
|
|
} // namespace v1
|
|
|
|
} // namespace api
|
|
|
|
|
|
|
|
DROGON_TEST(ClassName)
|
|
|
|
{
|
|
|
|
api::v1::hh h;
|
|
|
|
CHECK(h.className() == "api::v1::hh");
|
|
|
|
CHECK(api::v1::hh::classTypeName() == "api::v1::hh");
|
|
|
|
CHECK(h.name() == "api::v1::hh");
|
2024-01-31 02:43:30 +00:00
|
|
|
}
|