Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# What's New?

## 1.21

Improvements:

- Add name de-mangling for C++ symbols in the Test Explorer view when running tests with coverage. [#4340](https://github.com/microsoft/vscode-cmake-tools/pull/4340) [@rjaegers](https://github.com/rjaegers)

## 1.20.53

Improvements:
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3757,6 +3757,7 @@
"@types/chai": "^4.2.15",
"@types/chai-as-promised": "^7.1.3",
"@types/chai-string": "^1.4.2",
"@types/demangler-js": "^0.1.0",
"@types/js-yaml": "^4.0.0",
"@types/json5": "~0.0.30",
"@types/lodash": "4.14.202",
Expand Down Expand Up @@ -3811,6 +3812,7 @@
"@types/string.prototype.matchall": "^4.0.4",
"ajv": "^7.1.0",
"chokidar": "^3.5.1",
"demangler-js": "^0.1.7",
"handlebars": "^4.7.7",
"iconv-lite": "^0.6.2",
"js-yaml": "^4.0.0",
Expand Down
4 changes: 3 additions & 1 deletion src/coverage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as vscode from 'vscode';
import { lcovParser } from "@friedemannsommer/lcov-parser";
import * as nls from 'vscode-nls';
import * as logging from '@cmt/logging';
import { demangle } from 'demangler-js';

nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
Expand Down Expand Up @@ -60,7 +61,8 @@ export async function handleCoverageInfoFiles(run: vscode.TestRun, coverageInfoF

const declarations: vscode.DeclarationCoverage[] = [];
for (const declaration of section.functions.details) {
declarations.push(new vscode.DeclarationCoverage(declaration.name, declaration.hit,
const demangledName = demangle(declaration.name);
declarations.push(new vscode.DeclarationCoverage(demangledName, declaration.hit,
new vscode.Position(declaration.line - 1, 0)));
}

Expand Down