From 5b0912d99732536ae18d3c70730cc6df2ed3af24 Mon Sep 17 00:00:00 2001 From: Rowan Goemans Date: Thu, 28 Dec 2017 21:00:30 +0100 Subject: -- 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. --- src/test/MockDocument.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/test/MockDocument.ts') 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 { 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(";"); -- cgit v1.2.3