memgraph/tests/unit/demangle.cpp
Marin Tomic 5ff1ca4a5d Add client side RPC stats
Summary: ^^

Reviewers: mferencevic, buda

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1224
2018-02-22 12:34:48 +01:00

24 lines
481 B
C++

#include "glog/logging.h"
#include "gtest/gtest.h"
#include "utils/demangle.hpp"
using utils::Demangle;
struct DummyStruct {};
template <typename T>
class DummyClass {};
TEST(Demangle, Demangle) {
int x;
char *s;
DummyStruct t;
DummyClass<int> c;
EXPECT_EQ(*Demangle(typeid(x).name()), "int");
EXPECT_EQ(*Demangle(typeid(s).name()), "char*");
EXPECT_EQ(*Demangle(typeid(t).name()), "DummyStruct");
EXPECT_EQ(*Demangle(typeid(c).name()), "DummyClass<int>");
}