From d0b9d1868dc91aae5b79b414aaa51ab7100e2b60 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Sat, 24 Feb 2018 11:06:12 +0100 Subject: Add positive and negative test --- src/test/CppTests/Config.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/test') 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 bool \n", "foo(T a);"]).GetResult(); + assert.equal("/**\n * @brief \n * \n */", negativeResult); + testSetup.cfg.linesToGet = 2; + const positiveResult = testSetup.SetLines(["template 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); + }); }); -- cgit v1.2.3