summaryrefslogtreecommitdiffstats
path: root/src/test/CppTests/TestSetup.ts
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2018-02-24 23:29:59 +0100
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2018-02-25 01:58:38 +0100
commit041439c5544ca8f9627a922e125dbf7e7ad11769 (patch)
tree9e3047bd1a3f40d1e2de02e5a736c26ad3980e68 /src/test/CppTests/TestSetup.ts
parentf928a1049c6582e2fbb044676c5bbca89d9b7e33 (diff)
downloaddoxdocgen-041439c5544ca8f9627a922e125dbf7e7ad11769.tar.gz
Add options and allow change of option order
Diffstat (limited to 'src/test/CppTests/TestSetup.ts')
-rw-r--r--src/test/CppTests/TestSetup.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/CppTests/TestSetup.ts b/src/test/CppTests/TestSetup.ts
index ee7256d..2e6c7f1 100644
--- a/src/test/CppTests/TestSetup.ts
+++ b/src/test/CppTests/TestSetup.ts
@@ -13,11 +13,12 @@ import MockSelection from "../tools/MockSelection";
export default class TestSetup {
public cfg: Config;
-
+ public firstLine: number;
private editor: MockEditor;
constructor(method: string) {
this.cfg = new Config();
+ this.firstLine = 0;
this.SetLine(method);
}
@@ -38,7 +39,7 @@ export default class TestSetup {
.map((l) => new MockLine(l));
}
- const selection: MockSelection = new MockSelection(new MockPosition(0, 0));
+ const selection: MockSelection = new MockSelection(new MockPosition(this.firstLine, 0));
const doc: MockDocument = new MockDocument(mockLines);
this.editor = new MockEditor(selection, doc);
@@ -51,7 +52,8 @@ export default class TestSetup {
parser = new CppParser(this.cfg);
const gen: IDocGen = parser.Parse(this.editor);
- gen.GenerateDoc(new vscode.Range(new vscode.Position(0, 0), new vscode.Position(0, 0)));
+ // tslint:disable-next-line:max-line-length
+ gen.GenerateDoc(new vscode.Range(new vscode.Position(this.firstLine, 0), new vscode.Position(this.firstLine, 0)));
return this.editor.editBuilder.text;
}