Skip to content

Commit dd56e53

Browse files
committed
test: enable doLint test for gfortran-11
Remember different gfortran versions report diagnostics with different column numbers v9 vs v11
1 parent 3ff0193 commit dd56e53

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

test/linter-provider.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,25 @@ suite('Linter integration', () => {
3434
doc = await workspace.openTextDocument(fileUri);
3535
await window.showTextDocument(doc);
3636
});
37-
// FIXME: different versions of gfortran report the error at a different column number
37+
// different versions of gfortran report the error at a different column number
3838
// need to implement a the compiler versioning see #523
39-
// test('GNU - API call to doLint produces correct diagnostics', async () => {
40-
// const diags = await new FortranLintingProvider()['doLint'](doc);
41-
// const ref: Diagnostic[] = [
42-
// new Diagnostic(
43-
// new Range(new Position(21 - 1, 18 - 1), new Position(21 - 1, 18 - 1)),
44-
// 'Syntax error in argument list at (1)',
45-
// DiagnosticSeverity.Error
46-
// ),
47-
// new Diagnostic(
48-
// new Range(new Position(7 - 1, 9 - 1), new Position(7 - 1, 9 - 1)),
49-
// "Type specified for intrinsic function 'size' at (1) is ignored [-Wsurprising]",
50-
// DiagnosticSeverity.Warning
51-
// ),
52-
// ];
39+
test('GNU - API call to doLint produces correct diagnostics', async () => {
40+
const diags = await new FortranLintingProvider()['doLint'](doc);
41+
const ref: Diagnostic[] = [
42+
new Diagnostic(
43+
new Range(new Position(21 - 1, 18 - 1), new Position(21 - 1, 18 - 1)),
44+
'Syntax error in argument list at (1)',
45+
DiagnosticSeverity.Error
46+
),
47+
new Diagnostic(
48+
new Range(new Position(7 - 1, 9 - 1), new Position(7 - 1, 9 - 1)),
49+
"Type specified for intrinsic function 'size' at (1) is ignored [-Wsurprising]",
50+
DiagnosticSeverity.Warning
51+
),
52+
];
5353

54-
// deepStrictEqual(diags, ref);
55-
// });
54+
deepStrictEqual(diags, ref);
55+
});
5656

5757
test('Include path globs & internal variable resolution', async () => {
5858
const paths = linter['getGlobPathsFromSettings']('linter.includePaths');

0 commit comments

Comments
 (0)