[Alignment][NFC] Allow constexpr Align
[llvm-complete.git] / unittests / Demangle / DemangleTest.cpp
blobcb70a720cad9d35a6c8b42120c89788cade0b1a2
1 //===-- DemangleTest.cpp --------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "llvm/Demangle/Demangle.h"
10 #include "gmock/gmock.h"
12 using namespace llvm;
14 TEST(Demangle, demangleTest) {
15 EXPECT_EQ(demangle("_"), "_");
16 EXPECT_EQ(demangle("_Z3fooi"), "foo(int)");
17 EXPECT_EQ(demangle("__Z3fooi"), "foo(int)");
18 EXPECT_EQ(demangle("___Z3fooi_block_invoke"),
19 "invocation function for block in foo(int)");
20 EXPECT_EQ(demangle("____Z3fooi_block_invoke"),
21 "invocation function for block in foo(int)");
22 EXPECT_EQ(demangle("?foo@@YAXH@Z"), "void __cdecl foo(int)");
23 EXPECT_EQ(demangle("foo"), "foo");