summaryrefslogtreecommitdiffstats
path: root/src/test/CppTests/Config.test.ts
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2018-02-25 00:16:04 +0100
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2018-02-25 01:58:38 +0100
commitb9e681a0b1f2969bce02de8b19be8b589967ff81 (patch)
tree32fa9dbac8b3e52f5bccafa96caaf6053010157f /src/test/CppTests/Config.test.ts
parent041439c5544ca8f9627a922e125dbf7e7ad11769 (diff)
downloaddoxdocgen-b9e681a0b1f2969bce02de8b19be8b589967ff81.tar.gz
Add tests
Diffstat (limited to 'src/test/CppTests/Config.test.ts')
-rw-r--r--src/test/CppTests/Config.test.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/CppTests/Config.test.ts b/src/test/CppTests/Config.test.ts
index 0459dcb..bb16c20 100644
--- a/src/test/CppTests/Config.test.ts
+++ b/src/test/CppTests/Config.test.ts
@@ -8,6 +8,7 @@ import * as assert from "assert";
// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
+import * as moment from "moment";
import * as vscode from "vscode";
import { Config } from "../../Config";
import TestSetup from "./TestSetup";
@@ -92,4 +93,13 @@ suite("C++ - Configuration Tests", () => {
const negativeResult = testSetup.SetLines(["template<typename T> bool \n", "foo(T a);"]).GetResult();
assert.equal("/**\n * @brief \n * \n */", negativeResult);
});
+
+ test("File description order test", () => {
+ testSetup.cfg = new Config();
+ testSetup.firstLine = 0;
+ testSetup.cfg.fileOrder = ["brief", "author", "date", "file"];
+ const result = testSetup.SetLine("").GetResult();
+ assert.equal("/**\n * @brief \n * \n * @author your name\n" +
+ " * @date " + moment().format("YYYY-MM-DD") + "\n * @file MockDocument.h\n */", result);
+ });
});