Skip to content

Commit 25e22c4

Browse files
authored
Merge pull request #563 from fortran-lang/feature/test-restructure
Restructured test Fortran code
2 parents 11df362 + e60caa7 commit 25e22c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+69
-539
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"request": "launch",
1919
"runtimeExecutable": "${execPath}",
2020
"args": [
21-
"${workspaceFolder}/test/resources",
21+
"${workspaceFolder}/test/fortran",
2222
"--disable-extension=fortran-lang.linter-gfortran",
2323
"--extensionDevelopmentPath=${workspaceFolder}",
2424
"--extensionTestsPath=${workspaceFolder}/out/test"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,8 @@
515515
"webpack": "webpack --mode production",
516516
"pretest": "npm run compile-dev && tsc -p tsconfig.test.json",
517517
"test": "node ./out/test/runTest.js",
518-
"test:grammar-free": "vscode-tmgrammar-snap -s source.fortran.free -g ./syntaxes/fortran_free-form.tmLanguage.json \"./test/**/*{.f90,F90}\"",
519-
"test:grammar-fixed": "vscode-tmgrammar-snap -s source.fortran.fixed -g ./syntaxes/fortran_fixed-form.tmLanguage.json \"./test/**/*{.f,F}\"",
518+
"test:grammar-free": "vscode-tmgrammar-snap -s source.fortran.free -g ./syntaxes/fortran_free-form.tmLanguage.json \"./test/fortran/syntax/**/*{.f90,F90}\"",
519+
"test:grammar-fixed": "vscode-tmgrammar-snap -s source.fortran.fixed -g ./syntaxes/fortran_fixed-form.tmLanguage.json \"./test/fortran/syntax/**/*{.f,F}\"",
520520
"test:grammar": "npm run test:grammar-free && npm run test:grammar-fixed",
521521
"test:grammar-update": "npm run test:grammar-free -- -u && npm run test:grammar-fixed -- -u",
522522
"lint": "eslint . --ext .ts,.tsx",

test/extension.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { FortranDocumentSymbolProvider } from '../src/features/document-symbol-p
1515
// Defines a Mocha test suite to group tests of similar kind together
1616
suite('Extension Tests', () => {
1717
test('symbol provider works as expected', async () => {
18-
const filePath = path.resolve(__dirname, '../../test/resources/sample.f90');
18+
const filePath = path.resolve(__dirname, '../../test/fortran/sample.f90');
1919
const openPath = vscode.Uri.file(filePath);
2020
const doc = await vscode.workspace.openTextDocument(openPath);
2121
vscode.window.showTextDocument(doc);

test/formatting-provider.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ suite('Formatting tests', () => {
99
let doc: vscode.TextDocument;
1010
const fmt = new FortranFormattingProvider(new LoggingService());
1111
const fileUri = vscode.Uri.file(
12-
path.resolve(__dirname, '../../test/resources/formatting_test.f90')
12+
path.resolve(__dirname, '../../test/fortran/format/formatting_test.f90')
1313
);
1414

1515
suiteSetup(async function (): Promise<void> {
@@ -62,7 +62,10 @@ end program main
6262
test(`Using fprettify with stderr`, async () => {
6363
doc = await vscode.workspace.openTextDocument(
6464
vscode.Uri.file(
65-
path.resolve(__dirname, '../../test/resources/formatting_test_fprettify_long_lines.f90')
65+
path.resolve(
66+
__dirname,
67+
'../../test/fortran/format/formatting_test_fprettify_long_lines.f90'
68+
)
6669
)
6770
);
6871
const edits = await fmt['doFormatFprettify'](doc);
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)