diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a872150..8fbfb33 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -63,7 +63,7 @@ jobs: - name: Run unit tests working-directory: build - run: ctest + run: ctest --verbose - name: Generate code coverage if: ${{ matrix.os == 'ubuntu-latest' && matrix.cxx-std == 20 }} diff --git a/src/unix.cpp b/src/unix.cpp index a27f3a9..a772ff9 100644 --- a/src/unix.cpp +++ b/src/unix.cpp @@ -7,14 +7,13 @@ * This library is released under MIT license */ +#include #include #include -#include void replace_occurrences(std::string &input, const std::string &keyword, const std::string &replacement); -static void add_sym_separator(std::string &input, char symbol) -{ +static void add_sym_separator(std::string &input, char symbol) { size_t pos = 0; if (input.empty()) { @@ -35,7 +34,10 @@ std::string format_symbol(std::string input) { replace_occurrences(input, "std::__1::", "std::"); replace_occurrences(input, "std::__cxx11::", "std::"); + replace_occurrences(input, "[abi:cxx11]", ""); + replace_occurrences(input, "()", "(void)"); + replace_occurrences(input, "> >", ">>"); add_sym_separator(input, '*'); add_sym_separator(input, '&'); @@ -65,4 +67,4 @@ std::string get_demangled_name(const char *symbol) { free(res); return result; -} \ No newline at end of file +} diff --git a/tests/tests.cpp b/tests/tests.cpp index c34b380..1bc94c5 100755 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -186,7 +186,7 @@ TEST(filesystem, basic_test) { TEST(cpp_symbols, basic_test) { dylib lib("./", "dynamic_lib"); - + auto mean = lib.get_variable("meaning_of_life"); EXPECT_EQ(mean, 42);