summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2019-10-05 13:10:15 +0200
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2019-10-05 14:59:29 +0200
commitab10903637ceacb95fb47003ca512925b8d7faa3 (patch)
treee92c183800ebf4ace2503407c386d35e349c8835
parent4ab08d85d42d00fe689d0119eed269ed98b226c8 (diff)
downloaddoxdocgen-ab10903637ceacb95fb47003ca512925b8d7faa3.tar.gz
Fix tests
-rw-r--r--src/Lang/Cpp/CppParser.ts2
-rw-r--r--src/test/CppTests/Con-AndDestructor.test.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Lang/Cpp/CppParser.ts b/src/Lang/Cpp/CppParser.ts
index 35066fe..35f551c 100644
--- a/src/Lang/Cpp/CppParser.ts
+++ b/src/Lang/Cpp/CppParser.ts
@@ -430,7 +430,7 @@ export default class CppParser implements ICodeParser {
logicalLine.replace(/\*\//g, "");
}
- return logicalLine.trim();
+ return logicalLine.replace(/^\s+|\s+$/g, "");
}
throw new Error("More than " + linesToGet + " lines were read from editor and no end of expression was found.");
diff --git a/src/test/CppTests/Con-AndDestructor.test.ts b/src/test/CppTests/Con-AndDestructor.test.ts
index 36e4fd6..ba60501 100644
--- a/src/test/CppTests/Con-AndDestructor.test.ts
+++ b/src/test/CppTests/Con-AndDestructor.test.ts
@@ -54,7 +54,7 @@ suite("C++ - Con- and Destructor Tests", () => {
});
test("Deleted Destructor", () => {
- const result = testSetup.SetLine("virtual ~Foo() = 0").GetResult();
+ const result = testSetup.SetLine("virtual ~Foo() = 0;").GetResult();
assert.equal("/**\n * @brief \n * \n */", result);
});