From 38d30af3dec7c1f6b80aeced8d465690395e08e1 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Thu, 1 Mar 2018 20:14:57 +0100 Subject: Add tests and fix default smart text --- src/test/CppTests/Config.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/test/CppTests/Config.test.ts') diff --git a/src/test/CppTests/Config.test.ts b/src/test/CppTests/Config.test.ts index bb16c20..f210cf4 100644 --- a/src/test/CppTests/Config.test.ts +++ b/src/test/CppTests/Config.test.ts @@ -102,4 +102,16 @@ suite("C++ - Configuration Tests", () => { assert.equal("/**\n * @brief \n * \n * @author your name\n" + " * @date " + moment().format("YYYY-MM-DD") + "\n * @file MockDocument.h\n */", result); }); + + test("Custom smart text Ctor", () => { + testSetup.cfg.ctorText = "Test {name}"; + const result = testSetup.SetLine("Foo();").GetResult(); + assert.equal("/**\n * @brief Test Foo\n * \n */", result); + }); + + test("Custom smart text Dtor", () => { + testSetup.cfg.dtorText = "Test {name}"; + const result = testSetup.SetLine("~Foo();").GetResult(); + assert.equal("/**\n * @brief Test Foo\n * \n */", result); + }); }); -- cgit v1.2.3