diff options
| author | Christoph Schlosser <christoph@linux.com> | 2019-10-05 13:10:15 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christophschlosser@users.noreply.github.com> | 2019-10-05 14:59:29 +0200 |
| commit | ab10903637ceacb95fb47003ca512925b8d7faa3 (patch) | |
| tree | e92c183800ebf4ace2503407c386d35e349c8835 | |
| parent | 4ab08d85d42d00fe689d0119eed269ed98b226c8 (diff) | |
| download | doxdocgen-ab10903637ceacb95fb47003ca512925b8d7faa3.tar.gz | |
Fix tests
| -rw-r--r-- | src/Lang/Cpp/CppParser.ts | 2 | ||||
| -rw-r--r-- | src/test/CppTests/Con-AndDestructor.test.ts | 2 |
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); }); |