summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2018-02-24 11:06:12 +0100
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2018-02-24 11:30:16 +0100
commitd0b9d1868dc91aae5b79b414aaa51ab7100e2b60 (patch)
treef77067f5c3d706e5ef5b4717a81f7af378d9bdd3 /src/test
parentbe90733062442e3be3b5e9ba42d92a43fe558a5c (diff)
downloaddoxdocgen-d0b9d1868dc91aae5b79b414aaa51ab7100e2b60.tar.gz
Add positive and negative test
Diffstat (limited to 'src/test')
-rw-r--r--src/test/CppTests/Config.test.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/CppTests/Config.test.ts b/src/test/CppTests/Config.test.ts
index d33b5c1..8a8e939 100644
--- a/src/test/CppTests/Config.test.ts
+++ b/src/test/CppTests/Config.test.ts
@@ -80,4 +80,15 @@ suite("C++ - Configuration Tests", () => {
+ "\n * @param a \n * "
+ "@return true \n * @return false \n */", result);
});
+
+ test("Lines to get test", () => {
+ testSetup.cfg = new Config();
+ testSetup.cfg.linesToGet = 1;
+ const negativeResult = testSetup.SetLines(["template<typename T> bool \n", "foo(T a);"]).GetResult();
+ assert.equal("/**\n * @brief \n * \n */", negativeResult);
+ testSetup.cfg.linesToGet = 2;
+ const positiveResult = testSetup.SetLines(["template<typename T> bool \n", "foo(T a);"]).GetResult();
+ assert.equal("/**\n * @brief \n * \n * @tparam T \n * @param a \n * "
+ + "@return true \n * @return false \n */", positiveResult);
+ });
});