mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 03:28:33 -05:00
SQL Operations Studio Public Preview 1 (0.23) release source code
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { MarkerService } from 'vs/platform/markers/common/markerService';
|
||||
import { MainThreadDiagnostics } from 'vs/workbench/api/electron-browser/mainThreadDiagnostics';
|
||||
import URI from 'vs/base/common/uri';
|
||||
|
||||
|
||||
suite('MainThreadDiagnostics', function () {
|
||||
|
||||
let markerService: MarkerService;
|
||||
|
||||
setup(function () {
|
||||
markerService = new MarkerService();
|
||||
});
|
||||
|
||||
test('clear markers on dispose', function () {
|
||||
|
||||
let diag = new MainThreadDiagnostics(null, markerService);
|
||||
|
||||
diag.$changeMany('foo', [[URI.file('a'), [{
|
||||
code: '666',
|
||||
startLineNumber: 1,
|
||||
startColumn: 1,
|
||||
endLineNumber: 1,
|
||||
endColumn: 1,
|
||||
message: 'fffff',
|
||||
severity: 1,
|
||||
source: 'me'
|
||||
}]]]);
|
||||
|
||||
assert.equal(markerService.read().length, 1);
|
||||
diag.dispose();
|
||||
assert.equal(markerService.read().length, 0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user