diff options
| author | HO-COOH <42881734+HO-COOH@users.noreply.github.com> | 2021-04-30 18:43:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-30 12:43:47 +0200 |
| commit | 9f4f9cd3b6c8f78493d3c1c7c475a7098aebe58c (patch) | |
| tree | ab9c62a2c06239ea67d221a114e2f5f56adaecb7 /src/test/CppTests | |
| parent | dbcf5dc87d83ee59fc23e4eaa225a15655d17d2d (diff) | |
| download | doxdocgen-9f4f9cd3b6c8f78493d3c1c7c475a7098aebe58c.tar.gz | |
Fix unexpected return tag on non-functions (#214)
Diffstat (limited to 'src/test/CppTests')
| -rw-r--r-- | src/test/CppTests/Config.test.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/CppTests/Config.test.ts b/src/test/CppTests/Config.test.ts index f39b7d3..ec52c61 100644 --- a/src/test/CppTests/Config.test.ts +++ b/src/test/CppTests/Config.test.ts @@ -65,7 +65,7 @@ suite("C++ - Configuration Tests", () => { + " * @return bool \n */", result); }); - test("Disable including return type.", () => { + test("Disable including return type on function", () => { testSetup.cfg = new Config(); testSetup.cfg.Generic.includeTypeAtReturn = false; @@ -74,6 +74,14 @@ suite("C++ - Configuration Tests", () => { + " * @return \n */", result); }); + test("Disable including return type on non-function", () => { + testSetup.cfg = new Config(); + testSetup.cfg.Generic.includeTypeAtReturn = false; + + const result = testSetup.SetLine("bool b;").GetResult(); + assert.strictEqual("/**\n * @brief \n * \n */", result); + }); + test("Newlines after params and tparams but not after brief", () => { testSetup.cfg = new Config(); testSetup.cfg.Generic.order = ["brief", "tparam", "empty", "param", "empty", "return"]; |