MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / TEST_CASE

Function TEST_CASE

test/native/demangleTest.cpp:10–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <stdio.h>
9
10TEST_CASE(Demangle_test_needs_demangling) {
11 // Rust legacy-mangled symbol
12 CHECK_EQ(Demangle::needsDemangling("_ZN12panic_unwind3imp5panic17exception_cleanup17he4cf772173d90f46E"), true);
13 // Rust v0-mangled symbol
14 CHECK_EQ(Demangle::needsDemangling("_RNvCs6KtT2fMGqXk_8infiloop4main"), true);
15 // C++ symbol
16 CHECK_EQ(Demangle::needsDemangling("_ZNKSbIwSt11char_traitsIwESaIwEE4_Rep12_M_is_sharedEv"), true);
17 // C symbols
18 CHECK_EQ(Demangle::needsDemangling("malloc"), false);
19 CHECK_EQ(Demangle::needsDemangling("_malloc"), false);
20}
21
22TEST_CASE(Demangle_test_demangle_cpp) {
23 char *s = Demangle::demangle("_ZNSt15basic_streambufIwSt11char_traitsIwEE9pbackfailEj", false);

Callers

nothing calls this directly

Calls 1

demangleClass · 0.50

Tested by

no test coverage detected