summaryrefslogtreecommitdiffstats
path: root/src/test/MockDocument.ts
diff options
context:
space:
mode:
authorRowan Goemans <RB.Goemans@student.han.nl>2017-12-28 21:00:30 +0100
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2018-02-20 22:02:22 +0100
commit5b0912d99732536ae18d3c70730cc6df2ed3af24 (patch)
tree865a574c2639aa76bb088edbd4e4dd11926f8b4b /src/test/MockDocument.ts
parent0192f188aa8df79bbc7a2cec7a7e3f4bd0d70417 (diff)
downloaddoxdocgen-5b0912d99732536ae18d3c70730cc6df2ed3af24.tar.gz
-- Implemented support for all operators except the conversion operator.
-- Implemented support for noexcept and throw. -- Implemented support for constexpr. -- Implemented support for multiple template specifications. -- Rewritten some unit tests. -- Fixed bug where unnamed parameters weren't recognized properly -- Fixed bug where namespace with template params weren't being parsed correctly.
Diffstat (limited to 'src/test/MockDocument.ts')
-rw-r--r--src/test/MockDocument.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/MockDocument.ts b/src/test/MockDocument.ts
index 447adc9..cb6bbfe 100644
--- a/src/test/MockDocument.ts
+++ b/src/test/MockDocument.ts
@@ -12,18 +12,19 @@ export default class MockDocument implements vscode.TextDocument {
public eol: vscode.EndOfLine;
public lineCount: number;
private line: vscode.TextLine;
- private firstCall: boolean;
+ private callCount: number;
public constructor(line: vscode.TextLine) {
this.line = line;
- this.firstCall = true;
+ this.callCount = 0;
}
public save(): Thenable<boolean> {
throw new Error("Method not implemented.");
}
public lineAt(line: number | vscode.Position): vscode.TextLine;
public lineAt(position: any): any {
- if (this.firstCall) {
- this.firstCall = false;
+ if (++this.callCount === 1) {
+ return new MockLine("");
+ } else if (this.callCount === 2) {
return this.line;
} else {
return new MockLine(";");