From 928b520398f924207753e580d02d928e29a08021 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sun, 1 Oct 2023 12:35:42 +0200 Subject: [PATCH] test: annotation calls and named types referencing declarations in other files (#587) Closes partially #540 ### Summary of Changes Add tests to ensure that annotation calls and named types can reference declarations in other files. No changes to the implementation of the scope provider were needed. --------- Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com> --- .../scoping/safe-ds-scope-provider.ts | 8 ++--- tests/language/formatting/creator.ts | 3 ++ tests/language/partialEvaluation/creator.ts | 2 ++ tests/language/scoping/creator.ts | 2 +- tests/language/typing/creator.ts | 2 ++ tests/language/validation/creator.ts | 2 ++ ...ain no imports or own declarations.sdstest | 17 ++++++++++ ... with imports and own declarations.sdstest | 23 +++++++++++++ ...with multiple imports of same name.sdstest | 10 ++++++ ...n with qualified import with alias.sdstest | 31 +++++++++++++++++ .../main with qualified import.sdstest | 21 ++++++++++++ .../main with wildcard import.sdstest | 19 +++++++++++ .../resource other package.sdstest | 7 ++++ .../resource safeds package.sdstest | 7 ++++ .../resource same package.sdstest | 7 ++++ .../resource without package.sdstest | 5 +++ .../on parameter/main.sdstest | 10 ++++++ ...ain no imports or own declarations.sdstest | 18 ++++++++++ ... with imports and own declarations.sdstest | 24 ++++++++++++++ ...with multiple imports of same name.sdstest | 10 ++++++ ...n with qualified import with alias.sdstest | 32 ++++++++++++++++++ .../main with qualified import.sdstest | 22 +++++++++++++ .../main with wildcard import.sdstest | 20 +++++++++++ .../resource other package.sdstest | 7 ++++ .../resource safeds package.sdstest | 7 ++++ .../resource same package.sdstest | 7 ++++ .../resource without package.sdstest | 5 +++ ...ain no imports or own declarations.sdstest | 18 ++++++++++ ... with imports and own declarations.sdstest | 24 ++++++++++++++ ...with multiple imports of same name.sdstest | 10 ++++++ ...n with qualified import with alias.sdstest | 33 +++++++++++++++++++ .../main with qualified import.sdstest | 22 +++++++++++++ .../main with wildcard import.sdstest | 20 +++++++++++ .../resource other package.sdstest | 7 ++++ .../resource safeds package.sdstest | 7 ++++ .../resource same package.sdstest | 7 ++++ .../resource without package.sdstest | 5 +++ .../main.sdstest | 2 +- .../main.sdstest | 2 +- .../main.sdstest | 2 +- .../to global classes}/main.sdstest | 2 +- .../to global enums}/main.sdstest | 2 +- .../to nested classes}/main.sdstest | 2 +- .../to nested enums}/main.sdstest | 2 +- .../main.sdstest | 2 +- .../main.sdstest | 2 +- .../main.sdstest | 2 +- .../in global classes}/main.sdstest | 2 +- .../in global functions}/main.sdstest | 2 +- .../in methods}/main.sdstest | 2 +- .../in nested classes}/main.sdstest | 2 +- 51 files changed, 489 insertions(+), 20 deletions(-) create mode 100644 tests/resources/scoping/annotation calls/across files/main no imports or own declarations.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/main with imports and own declarations.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/main with multiple imports of same name.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/main with qualified import with alias.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/main with qualified import.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/main with wildcard import.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/resource other package.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/resource safeds package.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/resource same package.sdstest create mode 100644 tests/resources/scoping/annotation calls/across files/resource without package.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/main no imports or own declarations.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/main with imports and own declarations.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/main with multiple imports of same name.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/main with qualified import with alias.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/main with qualified import.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/main with wildcard import.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/resource other package.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/resource safeds package.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/resource same package.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global classes/resource without package.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/main no imports or own declarations.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/main with imports and own declarations.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/main with multiple imports of same name.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/main with qualified import with alias.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/main with qualified import.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/main with wildcard import.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/resource other package.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/resource safeds package.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/resource same package.sdstest create mode 100644 tests/resources/scoping/named types/across files/to global enums/resource without package.sdstest rename tests/resources/scoping/named types/{to containing named type declaration => in same file/to containing named type declarations}/main.sdstest (96%) rename tests/resources/scoping/named types/{to enum variant in global enum => in same file/to enum variants in global enums}/main.sdstest (91%) rename tests/resources/scoping/named types/{to enum variant in nested enum => in same file/to enum variants in nested enums}/main.sdstest (93%) rename tests/resources/scoping/named types/{to global class => in same file/to global classes}/main.sdstest (82%) rename tests/resources/scoping/named types/{to global enum => in same file/to global enums}/main.sdstest (82%) rename tests/resources/scoping/named types/{to nested class => in same file/to nested classes}/main.sdstest (91%) rename tests/resources/scoping/named types/{to nested enum => in same file/to nested enums}/main.sdstest (90%) rename tests/resources/scoping/named types/{to something other than named type declaration => in same file/to something other than named type declarations}/main.sdstest (55%) rename tests/resources/scoping/named types/{to type parameter/in enum variant in global enum => in same file/to type parameters/in enum variants in global enums}/main.sdstest (91%) rename tests/resources/scoping/named types/{to type parameter/in enum variant in nested enum => in same file/to type parameters/in enum variants in nested enums}/main.sdstest (94%) rename tests/resources/scoping/named types/{to type parameter/in global class => in same file/to type parameters/in global classes}/main.sdstest (90%) rename tests/resources/scoping/named types/{to type parameter/in global function => in same file/to type parameters/in global functions}/main.sdstest (89%) rename tests/resources/scoping/named types/{to type parameter/in method => in same file/to type parameters/in methods}/main.sdstest (96%) rename tests/resources/scoping/named types/{to type parameter/in nested class => in same file/to type parameters/in nested classes}/main.sdstest (96%) diff --git a/src/language/scoping/safe-ds-scope-provider.ts b/src/language/scoping/safe-ds-scope-provider.ts index 98d499418..ace5369bb 100644 --- a/src/language/scoping/safe-ds-scope-provider.ts +++ b/src/language/scoping/safe-ds-scope-provider.ts @@ -132,12 +132,10 @@ export class SafeDsScopeProvider extends DefaultScopeProvider { } private getScopeForMemberAccessMember(node: SdsMemberAccess): Scope { - let currentScope = EMPTY_SCOPE; - // Static access const declaration = this.getUniqueReferencedDeclarationForExpression(node.receiver); if (isSdsClass(declaration)) { - currentScope = this.createScopeForNodes(classMembersOrEmpty(declaration, isStatic)); + return this.createScopeForNodes(classMembersOrEmpty(declaration, isStatic)); // val superTypeMembers = receiverDeclaration.superClassMembers() // .filter { it.isStatic() } @@ -145,7 +143,7 @@ export class SafeDsScopeProvider extends DefaultScopeProvider { // // return Scopes.scopeFor(members, Scopes.scopeFor(superTypeMembers)) } else if (isSdsEnum(declaration)) { - currentScope = this.createScopeForNodes(enumVariantsOrEmpty(declaration)); + return this.createScopeForNodes(enumVariantsOrEmpty(declaration)); } // // Call results @@ -176,7 +174,7 @@ export class SafeDsScopeProvider extends DefaultScopeProvider { // else -> resultScope // } - return currentScope; + return EMPTY_SCOPE; } /** diff --git a/tests/language/formatting/creator.ts b/tests/language/formatting/creator.ts index 59b051985..2f4501cd6 100644 --- a/tests/language/formatting/creator.ts +++ b/tests/language/formatting/creator.ts @@ -5,6 +5,7 @@ import { Diagnostic } from 'vscode-languageserver-types'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; import { EmptyFileSystem } from 'langium'; import { getSyntaxErrors } from '../../helpers/diagnostics.js'; +import { clearDocuments } from 'langium/test'; const services = createSafeDsServices(EmptyFileSystem).SafeDs; const root = 'formatting'; @@ -29,12 +30,14 @@ const createFormattingTest = async (relativeResourcePath: string): Promise 0) { return invalidTest(relativeResourcePath, new SyntaxErrorsInOriginalCodeError(syntaxErrorsInOriginalCode)); } // Expected formatted code must not contain syntax errors + await clearDocuments(services); const syntaxErrorsInExpectedFormattedCode = await getSyntaxErrors(services, expectedFormattedCode); if (syntaxErrorsInExpectedFormattedCode.length > 0) { return invalidTest( diff --git a/tests/language/partialEvaluation/creator.ts b/tests/language/partialEvaluation/creator.ts index af6255edd..ee5e4205d 100644 --- a/tests/language/partialEvaluation/creator.ts +++ b/tests/language/partialEvaluation/creator.ts @@ -10,6 +10,7 @@ import { URI } from 'vscode-uri'; import { getSyntaxErrors, SyntaxErrorsInCodeError } from '../../helpers/diagnostics.js'; import { EmptyFileSystem } from 'langium'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; +import { clearDocuments } from 'langium/test'; const services = createSafeDsServices(EmptyFileSystem).SafeDs; const root = 'partial evaluation'; @@ -40,6 +41,7 @@ const createPartialEvaluationTest = async ( const code = fs.readFileSync(absolutePath).toString(); // File must not contain any syntax errors + await clearDocuments(services); const syntaxErrors = await getSyntaxErrors(services, code); if (syntaxErrors.length > 0) { return invalidTest( diff --git a/tests/language/scoping/creator.ts b/tests/language/scoping/creator.ts index 52f8d79b2..b3f718de0 100644 --- a/tests/language/scoping/creator.ts +++ b/tests/language/scoping/creator.ts @@ -40,6 +40,7 @@ const createScopingTest = async ( const code = fs.readFileSync(absolutePath).toString(); // File must not contain any syntax errors + await clearDocuments(services); const syntaxErrors = await getSyntaxErrors(services, code); if (syntaxErrors.length > 0) { return invalidTest( @@ -47,7 +48,6 @@ const createScopingTest = async ( new SyntaxErrorsInCodeError(syntaxErrors), ); } - await clearDocuments(services); const checksResult = findTestChecks(code, uri, { failIfFewerRangesThanComments: true }); diff --git a/tests/language/typing/creator.ts b/tests/language/typing/creator.ts index c541e5657..02d8f8622 100644 --- a/tests/language/typing/creator.ts +++ b/tests/language/typing/creator.ts @@ -10,6 +10,7 @@ import { URI } from 'vscode-uri'; import { getSyntaxErrors, SyntaxErrorsInCodeError } from '../../helpers/diagnostics.js'; import { EmptyFileSystem } from 'langium'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; +import { clearDocuments } from 'langium/test'; const services = createSafeDsServices(EmptyFileSystem).SafeDs; const root = 'typing'; @@ -39,6 +40,7 @@ const createTypingTest = async ( const code = fs.readFileSync(absolutePath).toString(); // File must not contain any syntax errors + await clearDocuments(services); const syntaxErrors = await getSyntaxErrors(services, code); if (syntaxErrors.length > 0) { return invalidTest( diff --git a/tests/language/validation/creator.ts b/tests/language/validation/creator.ts index 0de3fd37c..a36631ce6 100644 --- a/tests/language/validation/creator.ts +++ b/tests/language/validation/creator.ts @@ -10,6 +10,7 @@ import { getSyntaxErrors, SyntaxErrorsInCodeError } from '../../helpers/diagnost import { EmptyFileSystem } from 'langium'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; import { DocumentUri, Range } from 'vscode-languageserver-types'; +import { clearDocuments } from 'langium/test'; const services = createSafeDsServices(EmptyFileSystem).SafeDs; const root = 'validation'; @@ -38,6 +39,7 @@ const createValidationTest = async ( const code = fs.readFileSync(absolutePath).toString(); // File must not contain any syntax errors + await clearDocuments(services); const syntaxErrors = await getSyntaxErrors(services, code); if (syntaxErrors.length > 0) { return invalidTest( diff --git a/tests/resources/scoping/annotation calls/across files/main no imports or own declarations.sdstest b/tests/resources/scoping/annotation calls/across files/main no imports or own declarations.sdstest new file mode 100644 index 000000000..bd7c452c0 --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/main no imports or own declarations.sdstest @@ -0,0 +1,17 @@ +package tests.scoping.annotationCalls.acrossFiles + +// $TEST$ references same_MyAnnotation +@»MyAnnotation« + +// $TEST$ references same_AnnotationInSamePackage +@»AnnotationInSamePackage« + +// $TEST$ references safeds_AnnotationInSafeDsPackage +@»AnnotationInSafeDsPackage« + +// $TEST$ unresolved +@»AnnotationInAnotherPackage« + +// $TEST$ unresolved +@»AnnotationWithoutPackage« +pipeline myPipeline {} diff --git a/tests/resources/scoping/annotation calls/across files/main with imports and own declarations.sdstest b/tests/resources/scoping/annotation calls/across files/main with imports and own declarations.sdstest new file mode 100644 index 000000000..f449c2b9a --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/main with imports and own declarations.sdstest @@ -0,0 +1,23 @@ +package tests.scoping.annotationCalls.acrossFiles + +import safeds.scoping.annotationCalls.acrossFiles.MyAnnotation as MyOwnAnnotation +import tests.scoping.annotationCalls.acrossFiles.other.AnnotationInAnotherPackage + +// $TEST$ target own_MyOwnAnnotation +annotation »MyOwnAnnotation« + +// $TEST$ references own_MyOwnAnnotation +@»MyOwnAnnotation« + +// $TEST$ references same_AnnotationInSamePackage +@»AnnotationInSamePackage« + +// $TEST$ references safeds_AnnotationInSafeDsPackage +@»AnnotationInSafeDsPackage« + +// $TEST$ references other_AnnotationInAnotherPackage +@»AnnotationInAnotherPackage« + +// $TEST$ unresolved +@»AnnotationWithoutPackage« +pipeline myPipeline {} diff --git a/tests/resources/scoping/annotation calls/across files/main with multiple imports of same name.sdstest b/tests/resources/scoping/annotation calls/across files/main with multiple imports of same name.sdstest new file mode 100644 index 000000000..0fb5e547d --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/main with multiple imports of same name.sdstest @@ -0,0 +1,10 @@ +package tests.scoping.annotationCalls.acrossFiles + +import safeds.scoping.annotationCalls.acrossFiles.MyAnnotation +import tests.scoping.annotationCalls.acrossFiles.other.MyAnnotation +import tests.scoping.annotationCalls.acrossFiles.MyAnnotation + +pipeline myPipeline { + // $TEST$ references safeds_MyAnnotation + »MyAnnotation«; +} diff --git a/tests/resources/scoping/annotation calls/across files/main with qualified import with alias.sdstest b/tests/resources/scoping/annotation calls/across files/main with qualified import with alias.sdstest new file mode 100644 index 000000000..dc07cf4ab --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/main with qualified import with alias.sdstest @@ -0,0 +1,31 @@ +package tests.scoping.annotationCalls.acrossFiles + +import tests.scoping.annotationCalls.acrossFiles.MyAnnotation as MyAnnotationInSamePackage +import safeds.scoping.annotationCalls.acrossFiles.MyAnnotation as MyAnnotationInSafeDsPackage +import tests.scoping.annotationCalls.acrossFiles.other.MyAnnotation as MyAnnotationInAnotherPackage + +// $TEST$ references same_MyAnnotation +@»MyAnnotation« + + +// $TEST$ references same_AnnotationInSamePackage +@»AnnotationInSamePackage« + +// $TEST$ references safeds_AnnotationInSafeDsPackage +@»AnnotationInSafeDsPackage« + +// $TEST$ unresolved +@»AnnotationInAnotherPackage« + +// $TEST$ unresolved +@»AnnotationWithoutPackage« + +// $TEST$ references same_MyAnnotation +@»MyAnnotationInSamePackage« + +// $TEST$ references safeds_MyAnnotation +@»MyAnnotationInSafeDsPackage« + +// $TEST$ references other_MyAnnotation +@»MyAnnotationInAnotherPackage« +pipeline myPipeline {} diff --git a/tests/resources/scoping/annotation calls/across files/main with qualified import.sdstest b/tests/resources/scoping/annotation calls/across files/main with qualified import.sdstest new file mode 100644 index 000000000..48e4f14cb --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/main with qualified import.sdstest @@ -0,0 +1,21 @@ +package tests.scoping.annotationCalls.acrossFiles + +import safeds.scoping.annotationCalls.acrossFiles.MyAnnotation +import tests.scoping.annotationCalls.acrossFiles.other.AnnotationInAnotherPackage +import AnnotationWithoutPackage + +// $TEST$ references safeds_MyAnnotation +@»MyAnnotation« + +// $TEST$ references same_AnnotationInSamePackage +@»AnnotationInSamePackage« + +// $TEST$ references safeds_AnnotationInSafeDsPackage +@»AnnotationInSafeDsPackage« + +// $TEST$ references other_AnnotationInAnotherPackage +@»AnnotationInAnotherPackage« + +// $TEST$ unresolved +@»AnnotationWithoutPackage« +pipeline myPipeline {} diff --git a/tests/resources/scoping/annotation calls/across files/main with wildcard import.sdstest b/tests/resources/scoping/annotation calls/across files/main with wildcard import.sdstest new file mode 100644 index 000000000..b469ec94b --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/main with wildcard import.sdstest @@ -0,0 +1,19 @@ +package tests.scoping.annotationCalls.acrossFiles + +import safeds.scoping.annotationCalls.acrossFiles.* + +// $TEST$ references safeds_MyAnnotation +@»MyAnnotation« + +// $TEST$ references same_AnnotationInSamePackage +@»AnnotationInSamePackage« + +// $TEST$ references safeds_AnnotationInSafeDsPackage +@»AnnotationInSafeDsPackage« + +// $TEST$ unresolved +@»AnnotationInAnotherPackage« + +// $TEST$ unresolved +@»AnnotationWithoutPackage« +pipeline myPipeline {} diff --git a/tests/resources/scoping/annotation calls/across files/resource other package.sdstest b/tests/resources/scoping/annotation calls/across files/resource other package.sdstest new file mode 100644 index 000000000..9ed1a6aa7 --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/resource other package.sdstest @@ -0,0 +1,7 @@ +package tests.scoping.annotationCalls.acrossFiles.other + +// $TEST$ target other_MyAnnotation +annotation »MyAnnotation« + +// $TEST$ target other_AnnotationInAnotherPackage +annotation »AnnotationInAnotherPackage« diff --git a/tests/resources/scoping/annotation calls/across files/resource safeds package.sdstest b/tests/resources/scoping/annotation calls/across files/resource safeds package.sdstest new file mode 100644 index 000000000..ec8a3f211 --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/resource safeds package.sdstest @@ -0,0 +1,7 @@ +package safeds.scoping.annotationCalls.acrossFiles + +// $TEST$ target safeds_MyAnnotation +annotation »MyAnnotation« + +// $TEST$ target safeds_AnnotationInSafeDsPackage +annotation »AnnotationInSafeDsPackage« diff --git a/tests/resources/scoping/annotation calls/across files/resource same package.sdstest b/tests/resources/scoping/annotation calls/across files/resource same package.sdstest new file mode 100644 index 000000000..1bb35a8ba --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/resource same package.sdstest @@ -0,0 +1,7 @@ +package tests.scoping.annotationCalls.acrossFiles + +// $TEST$ target same_MyAnnotation +annotation »MyAnnotation« + +// $TEST$ target same_AnnotationInSamePackage +annotation »AnnotationInSamePackage« diff --git a/tests/resources/scoping/annotation calls/across files/resource without package.sdstest b/tests/resources/scoping/annotation calls/across files/resource without package.sdstest new file mode 100644 index 000000000..39a33d045 --- /dev/null +++ b/tests/resources/scoping/annotation calls/across files/resource without package.sdstest @@ -0,0 +1,5 @@ +// $TEST$ target without_MyAnnotation +annotation »MyAnnotation« + +// $TEST$ target without_AnnotationWithoutPackage +annotation »AnnotationWithoutPackage« diff --git a/tests/resources/scoping/annotation calls/on parameter/main.sdstest b/tests/resources/scoping/annotation calls/on parameter/main.sdstest index af33e55bf..2fbdde2c9 100644 --- a/tests/resources/scoping/annotation calls/on parameter/main.sdstest +++ b/tests/resources/scoping/annotation calls/on parameter/main.sdstest @@ -15,6 +15,16 @@ fun myFunction( myParameter: Int ) +pipeline myPipeline { + val alias = Before; + + // $TEST$ unresolved + (@»alias« myParameter) {}; + + // $TEST$ unresolved + (@»alias« myParameter) -> 1; +} + // $TEST$ target after annotation »After« diff --git a/tests/resources/scoping/named types/across files/to global classes/main no imports or own declarations.sdstest b/tests/resources/scoping/named types/across files/to global classes/main no imports or own declarations.sdstest new file mode 100644 index 000000000..83bf6e2d5 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/main no imports or own declarations.sdstest @@ -0,0 +1,18 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalClasses + +segment mySegment( + // $TEST$ references same_MyClass + p1: »MyClass«, + + // $TEST$ references same_ClassInSamePackage + p2: »ClassInSamePackage«, + + // $TEST$ references safeds_ClassInSafeDsPackage + p3: »ClassInSafeDsPackage«, + + // $TEST$ unresolved + p4: »ClassInAnotherPackage«, + + // $TEST$ unresolved + p5: »ClassWithoutPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global classes/main with imports and own declarations.sdstest b/tests/resources/scoping/named types/across files/to global classes/main with imports and own declarations.sdstest new file mode 100644 index 000000000..9e298a5d3 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/main with imports and own declarations.sdstest @@ -0,0 +1,24 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalClasses + +import safeds.scoping.namedTypes.acrossFiles.toGlobalClasses.MyClass as MyOwnClass +import tests.scoping.namedTypes.acrossFiles.toGlobalClasses.other.ClassInAnotherPackage + +// $TEST$ target own_MyOwnClass +class »MyOwnClass« + +segment mySegment( + // $TEST$ references own_MyOwnClass + p1: »MyOwnClass«, + + // $TEST$ references same_ClassInSamePackage + p2: »ClassInSamePackage«, + + // $TEST$ references safeds_ClassInSafeDsPackage + p3: »ClassInSafeDsPackage«, + + // $TEST$ references other_ClassInAnotherPackage + p4: »ClassInAnotherPackage«, + + // $TEST$ unresolved + p5: »ClassWithoutPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global classes/main with multiple imports of same name.sdstest b/tests/resources/scoping/named types/across files/to global classes/main with multiple imports of same name.sdstest new file mode 100644 index 000000000..bd261971e --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/main with multiple imports of same name.sdstest @@ -0,0 +1,10 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalClasses + +import safeds.scoping.namedTypes.acrossFiles.toGlobalClasses.MyClass +import tests.scoping.namedTypes.acrossFiles.toGlobalClasses.other.MyClass +import tests.scoping.namedTypes.acrossFiles.toGlobalClasses.MyClass + +segment mySegment( + // $TEST$ references safeds_MyClass + p: »MyClass«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global classes/main with qualified import with alias.sdstest b/tests/resources/scoping/named types/across files/to global classes/main with qualified import with alias.sdstest new file mode 100644 index 000000000..4d194a536 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/main with qualified import with alias.sdstest @@ -0,0 +1,32 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalClasses + +import tests.scoping.namedTypes.acrossFiles.toGlobalClasses.MyClass as MyClassInSamePackage +import safeds.scoping.namedTypes.acrossFiles.toGlobalClasses.MyClass as MyClassInSafeDsPackage +import tests.scoping.namedTypes.acrossFiles.toGlobalClasses.other.MyClass as MyClassInAnotherPackage + +segment mySegment( + // $TEST$ references same_MyClass + p1: »MyClass«, + + + // $TEST$ references same_ClassInSamePackage + p2: »ClassInSamePackage«, + + // $TEST$ references safeds_ClassInSafeDsPackage + p3: »ClassInSafeDsPackage«, + + // $TEST$ unresolved + p4: »ClassInAnotherPackage«, + + // $TEST$ unresolved + p5: »ClassWithoutPackage«, + + // $TEST$ references same_MyClass + p6: »MyClassInSamePackage«, + + // $TEST$ references safeds_MyClass + p7: »MyClassInSafeDsPackage«, + + // $TEST$ references other_MyClass + p8: »MyClassInAnotherPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global classes/main with qualified import.sdstest b/tests/resources/scoping/named types/across files/to global classes/main with qualified import.sdstest new file mode 100644 index 000000000..544720a3f --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/main with qualified import.sdstest @@ -0,0 +1,22 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalClasses + +import safeds.scoping.namedTypes.acrossFiles.toGlobalClasses.MyClass +import tests.scoping.namedTypes.acrossFiles.toGlobalClasses.other.ClassInAnotherPackage +import ClassWithoutPackage + +segment mySegment( + // $TEST$ references safeds_MyClass + p1: »MyClass«, + + // $TEST$ references same_ClassInSamePackage + p2: »ClassInSamePackage«, + + // $TEST$ references safeds_ClassInSafeDsPackage + p3: »ClassInSafeDsPackage«, + + // $TEST$ references other_ClassInAnotherPackage + p4: »ClassInAnotherPackage«, + + // $TEST$ unresolved + p5: »ClassWithoutPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global classes/main with wildcard import.sdstest b/tests/resources/scoping/named types/across files/to global classes/main with wildcard import.sdstest new file mode 100644 index 000000000..d1c899a10 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/main with wildcard import.sdstest @@ -0,0 +1,20 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalClasses + +import safeds.scoping.namedTypes.acrossFiles.toGlobalClasses.* + +segment mySegment( + // $TEST$ references safeds_MyClass + p1: »MyClass«, + + // $TEST$ references same_ClassInSamePackage + p2: »ClassInSamePackage«, + + // $TEST$ references safeds_ClassInSafeDsPackage + p3: »ClassInSafeDsPackage«, + + // $TEST$ unresolved + p4: »ClassInAnotherPackage«, + + // $TEST$ unresolved + p5: »ClassWithoutPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global classes/resource other package.sdstest b/tests/resources/scoping/named types/across files/to global classes/resource other package.sdstest new file mode 100644 index 000000000..512db2e9a --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/resource other package.sdstest @@ -0,0 +1,7 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalClasses.other + +// $TEST$ target other_MyClass +class »MyClass« + +// $TEST$ target other_ClassInAnotherPackage +class »ClassInAnotherPackage« diff --git a/tests/resources/scoping/named types/across files/to global classes/resource safeds package.sdstest b/tests/resources/scoping/named types/across files/to global classes/resource safeds package.sdstest new file mode 100644 index 000000000..a51a37c2d --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/resource safeds package.sdstest @@ -0,0 +1,7 @@ +package safeds.scoping.namedTypes.acrossFiles.toGlobalClasses + +// $TEST$ target safeds_MyClass +class »MyClass« + +// $TEST$ target safeds_ClassInSafeDsPackage +class »ClassInSafeDsPackage« diff --git a/tests/resources/scoping/named types/across files/to global classes/resource same package.sdstest b/tests/resources/scoping/named types/across files/to global classes/resource same package.sdstest new file mode 100644 index 000000000..742ed65ec --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/resource same package.sdstest @@ -0,0 +1,7 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalClasses + +// $TEST$ target same_MyClass +class »MyClass« + +// $TEST$ target same_ClassInSamePackage +class »ClassInSamePackage« diff --git a/tests/resources/scoping/named types/across files/to global classes/resource without package.sdstest b/tests/resources/scoping/named types/across files/to global classes/resource without package.sdstest new file mode 100644 index 000000000..bcd074356 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global classes/resource without package.sdstest @@ -0,0 +1,5 @@ +// $TEST$ target without_MyClass +class »MyClass« + +// $TEST$ target without_ClassWithoutPackage +class »ClassWithoutPackage« diff --git a/tests/resources/scoping/named types/across files/to global enums/main no imports or own declarations.sdstest b/tests/resources/scoping/named types/across files/to global enums/main no imports or own declarations.sdstest new file mode 100644 index 000000000..7f0a0cef0 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/main no imports or own declarations.sdstest @@ -0,0 +1,18 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalEnums + +segment mySegment( + // $TEST$ references same_MyEnum + p1: »MyEnum«, + + // $TEST$ references same_EnumInSamePackage + p2: »EnumInSamePackage«, + + // $TEST$ references safeds_EnumInSafeDsPackage + p3: »EnumInSafeDsPackage«, + + // $TEST$ unresolved + p4: »EnumInAnotherPackage«, + + // $TEST$ unresolved + p5: »EnumWithoutPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global enums/main with imports and own declarations.sdstest b/tests/resources/scoping/named types/across files/to global enums/main with imports and own declarations.sdstest new file mode 100644 index 000000000..f4e25b3cf --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/main with imports and own declarations.sdstest @@ -0,0 +1,24 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalEnums + +import safeds.scoping.namedTypes.acrossFiles.toGlobalEnums.MyEnum as MyOwnEnum +import tests.scoping.namedTypes.acrossFiles.toGlobalEnums.other.EnumInAnotherPackage + +// $TEST$ target own_MyOwnEnum +enum »MyOwnEnum« + +segment mySegment( + // $TEST$ references own_MyOwnEnum + p1: »MyOwnEnum«, + + // $TEST$ references same_EnumInSamePackage + p2: »EnumInSamePackage«, + + // $TEST$ references safeds_EnumInSafeDsPackage + p3: »EnumInSafeDsPackage«, + + // $TEST$ references other_EnumInAnotherPackage + p4: »EnumInAnotherPackage«, + + // $TEST$ unresolved + p5: »EnumWithoutPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global enums/main with multiple imports of same name.sdstest b/tests/resources/scoping/named types/across files/to global enums/main with multiple imports of same name.sdstest new file mode 100644 index 000000000..235cac0e9 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/main with multiple imports of same name.sdstest @@ -0,0 +1,10 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalEnums + +import safeds.scoping.namedTypes.acrossFiles.toGlobalEnums.MyEnum +import tests.scoping.namedTypes.acrossFiles.toGlobalEnums.other.MyEnum +import tests.scoping.namedTypes.acrossFiles.toGlobalEnums.MyEnum + +segment mySegment( + // $TEST$ references safeds_MyEnum + p: »MyEnum«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global enums/main with qualified import with alias.sdstest b/tests/resources/scoping/named types/across files/to global enums/main with qualified import with alias.sdstest new file mode 100644 index 000000000..4c58b1389 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/main with qualified import with alias.sdstest @@ -0,0 +1,33 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalEnums + +import tests.scoping.namedTypes.acrossFiles.toGlobalEnums.MyEnum as MyEnumInSamePackage +import safeds.scoping.namedTypes.acrossFiles.toGlobalEnums.MyEnum as MyEnumInSafeDsPackage +import tests.scoping.namedTypes.acrossFiles.toGlobalEnums.other.MyEnum as MyEnumInAnotherPackage + +segment mySegment( + // $TEST$ references same_MyEnum + p1: »MyEnum«, + + + // $TEST$ references same_EnumInSamePackage + p2: »EnumInSamePackage«, + + // $TEST$ references safeds_EnumInSafeDsPackage + p3: »EnumInSafeDsPackage«, + + // $TEST$ unresolved + p4: »EnumInAnotherPackage«, + + // $TEST$ unresolved + p5: »EnumWithoutPackage«, + + + // $TEST$ references same_MyEnum + p6: »MyEnumInSamePackage«, + + // $TEST$ references safeds_MyEnum + p7: »MyEnumInSafeDsPackage«, + + // $TEST$ references other_MyEnum + p8: »MyEnumInAnotherPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global enums/main with qualified import.sdstest b/tests/resources/scoping/named types/across files/to global enums/main with qualified import.sdstest new file mode 100644 index 000000000..afded84e7 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/main with qualified import.sdstest @@ -0,0 +1,22 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalEnums + +import safeds.scoping.namedTypes.acrossFiles.toGlobalEnums.MyEnum +import tests.scoping.namedTypes.acrossFiles.toGlobalEnums.other.EnumInAnotherPackage +import EnumWithoutPackage + +segment mySegment( + // $TEST$ references safeds_MyEnum + p1: »MyEnum«, + + // $TEST$ references same_EnumInSamePackage + p2: »EnumInSamePackage«, + + // $TEST$ references safeds_EnumInSafeDsPackage + p3: »EnumInSafeDsPackage«, + + // $TEST$ references other_EnumInAnotherPackage + p4: »EnumInAnotherPackage«, + + // $TEST$ unresolved + p5: »EnumWithoutPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global enums/main with wildcard import.sdstest b/tests/resources/scoping/named types/across files/to global enums/main with wildcard import.sdstest new file mode 100644 index 000000000..3e4f0aec6 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/main with wildcard import.sdstest @@ -0,0 +1,20 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalEnums + +import safeds.scoping.namedTypes.acrossFiles.toGlobalEnums.* + +segment mySegment( + // $TEST$ references safeds_MyEnum + p1: »MyEnum«, + + // $TEST$ references same_EnumInSamePackage + p2: »EnumInSamePackage«, + + // $TEST$ references safeds_EnumInSafeDsPackage + p3: »EnumInSafeDsPackage«, + + // $TEST$ unresolved + p4: »EnumInAnotherPackage«, + + // $TEST$ unresolved + p5: »EnumWithoutPackage«, +) {} diff --git a/tests/resources/scoping/named types/across files/to global enums/resource other package.sdstest b/tests/resources/scoping/named types/across files/to global enums/resource other package.sdstest new file mode 100644 index 000000000..eb3108406 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/resource other package.sdstest @@ -0,0 +1,7 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalEnums.other + +// $TEST$ target other_MyEnum +enum »MyEnum« + +// $TEST$ target other_EnumInAnotherPackage +enum »EnumInAnotherPackage« diff --git a/tests/resources/scoping/named types/across files/to global enums/resource safeds package.sdstest b/tests/resources/scoping/named types/across files/to global enums/resource safeds package.sdstest new file mode 100644 index 000000000..0c032246f --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/resource safeds package.sdstest @@ -0,0 +1,7 @@ +package safeds.scoping.namedTypes.acrossFiles.toGlobalEnums + +// $TEST$ target safeds_MyEnum +enum »MyEnum« + +// $TEST$ target safeds_EnumInSafeDsPackage +enum »EnumInSafeDsPackage« diff --git a/tests/resources/scoping/named types/across files/to global enums/resource same package.sdstest b/tests/resources/scoping/named types/across files/to global enums/resource same package.sdstest new file mode 100644 index 000000000..c5e7e0f02 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/resource same package.sdstest @@ -0,0 +1,7 @@ +package tests.scoping.namedTypes.acrossFiles.toGlobalEnums + +// $TEST$ target same_MyEnum +enum »MyEnum« + +// $TEST$ target same_EnumInSamePackage +enum »EnumInSamePackage« diff --git a/tests/resources/scoping/named types/across files/to global enums/resource without package.sdstest b/tests/resources/scoping/named types/across files/to global enums/resource without package.sdstest new file mode 100644 index 000000000..7587c7e28 --- /dev/null +++ b/tests/resources/scoping/named types/across files/to global enums/resource without package.sdstest @@ -0,0 +1,5 @@ +// $TEST$ target without_MyEnum +enum »MyEnum« + +// $TEST$ target without_EnumWithoutPackage +enum »EnumWithoutPackage« diff --git a/tests/resources/scoping/named types/to containing named type declaration/main.sdstest b/tests/resources/scoping/named types/in same file/to containing named type declarations/main.sdstest similarity index 96% rename from tests/resources/scoping/named types/to containing named type declaration/main.sdstest rename to tests/resources/scoping/named types/in same file/to containing named type declarations/main.sdstest index 18027fa00..643cd63d3 100644 --- a/tests/resources/scoping/named types/to containing named type declaration/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to containing named type declarations/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toContainingNamedTypeDeclaration +package tests.scoping.namedTypes.inSameFile.toContainingNamedTypeDeclarations // $TEST$ target outerClass class »MyClass«( diff --git a/tests/resources/scoping/named types/to enum variant in global enum/main.sdstest b/tests/resources/scoping/named types/in same file/to enum variants in global enums/main.sdstest similarity index 91% rename from tests/resources/scoping/named types/to enum variant in global enum/main.sdstest rename to tests/resources/scoping/named types/in same file/to enum variants in global enums/main.sdstest index 8449daa48..476382595 100644 --- a/tests/resources/scoping/named types/to enum variant in global enum/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to enum variants in global enums/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toEnumVariantInGlobalEnum +package tests.scoping.namedTypes.inSameFile.toEnumVariantInGlobalEnums enum BeforeEnum { // $TEST$ target before diff --git a/tests/resources/scoping/named types/to enum variant in nested enum/main.sdstest b/tests/resources/scoping/named types/in same file/to enum variants in nested enums/main.sdstest similarity index 93% rename from tests/resources/scoping/named types/to enum variant in nested enum/main.sdstest rename to tests/resources/scoping/named types/in same file/to enum variants in nested enums/main.sdstest index 988f383e3..26c1e68f5 100644 --- a/tests/resources/scoping/named types/to enum variant in nested enum/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to enum variants in nested enums/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toEnumVariantInNestedEnum +package tests.scoping.namedTypes.inSameFile.toEnumVariantsInNestedEnums class BeforeClass { enum BeforeEnum { diff --git a/tests/resources/scoping/named types/to global class/main.sdstest b/tests/resources/scoping/named types/in same file/to global classes/main.sdstest similarity index 82% rename from tests/resources/scoping/named types/to global class/main.sdstest rename to tests/resources/scoping/named types/in same file/to global classes/main.sdstest index 8ee426134..412e4c4eb 100644 --- a/tests/resources/scoping/named types/to global class/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to global classes/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toGlobalClass +package tests.scoping.namedTypes.inSameFile.toGlobalClasses // $TEST$ target before class »BeforeClass« diff --git a/tests/resources/scoping/named types/to global enum/main.sdstest b/tests/resources/scoping/named types/in same file/to global enums/main.sdstest similarity index 82% rename from tests/resources/scoping/named types/to global enum/main.sdstest rename to tests/resources/scoping/named types/in same file/to global enums/main.sdstest index f31de39d2..dfa877d55 100644 --- a/tests/resources/scoping/named types/to global enum/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to global enums/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toGlobalEnum +package tests.scoping.namedTypes.inSameFile.toGlobalEnums // $TEST$ target before enum »BeforeEnum« diff --git a/tests/resources/scoping/named types/to nested class/main.sdstest b/tests/resources/scoping/named types/in same file/to nested classes/main.sdstest similarity index 91% rename from tests/resources/scoping/named types/to nested class/main.sdstest rename to tests/resources/scoping/named types/in same file/to nested classes/main.sdstest index 32c724b46..5b92a43cd 100644 --- a/tests/resources/scoping/named types/to nested class/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to nested classes/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toNestedClass +package tests.scoping.namedTypes.inSameFile.toNestedClasses class BeforeOuterClass { // $TEST$ target before diff --git a/tests/resources/scoping/named types/to nested enum/main.sdstest b/tests/resources/scoping/named types/in same file/to nested enums/main.sdstest similarity index 90% rename from tests/resources/scoping/named types/to nested enum/main.sdstest rename to tests/resources/scoping/named types/in same file/to nested enums/main.sdstest index 8b94ede4b..a210c8590 100644 --- a/tests/resources/scoping/named types/to nested enum/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to nested enums/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toNestedEnum +package tests.scoping.namedTypes.inSameFile.toNestedEnums class BeforeClass { // $TEST$ target before diff --git a/tests/resources/scoping/named types/to something other than named type declaration/main.sdstest b/tests/resources/scoping/named types/in same file/to something other than named type declarations/main.sdstest similarity index 55% rename from tests/resources/scoping/named types/to something other than named type declaration/main.sdstest rename to tests/resources/scoping/named types/in same file/to something other than named type declarations/main.sdstest index d039c5903..f94e12101 100644 --- a/tests/resources/scoping/named types/to something other than named type declaration/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to something other than named type declarations/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toSomethingOtherThanNamedTypeDeclaration +package tests.scoping.namedTypes.inSameFile.toSomethingOtherThanNamedTypeDeclarations // $TEST$ unresolved segment mySegment(p: »notANamedTypeDeclaration«) {} diff --git a/tests/resources/scoping/named types/to type parameter/in enum variant in global enum/main.sdstest b/tests/resources/scoping/named types/in same file/to type parameters/in enum variants in global enums/main.sdstest similarity index 91% rename from tests/resources/scoping/named types/to type parameter/in enum variant in global enum/main.sdstest rename to tests/resources/scoping/named types/in same file/to type parameters/in enum variants in global enums/main.sdstest index eeddca39b..acd5a7222 100644 --- a/tests/resources/scoping/named types/to type parameter/in enum variant in global enum/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to type parameters/in enum variants in global enums/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toTypeParameter.inEnumVariantInGlobalEnum +package tests.scoping.namedTypes.inSameFile.toTypeParameter.inEnumVariantsInGlobalEnums fun myFunction1() diff --git a/tests/resources/scoping/named types/to type parameter/in enum variant in nested enum/main.sdstest b/tests/resources/scoping/named types/in same file/to type parameters/in enum variants in nested enums/main.sdstest similarity index 94% rename from tests/resources/scoping/named types/to type parameter/in enum variant in nested enum/main.sdstest rename to tests/resources/scoping/named types/in same file/to type parameters/in enum variants in nested enums/main.sdstest index 41799ad28..3bc4e67d3 100644 --- a/tests/resources/scoping/named types/to type parameter/in enum variant in nested enum/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to type parameters/in enum variants in nested enums/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toTypeParameter.inEnumVariantInNestedEnum +package tests.scoping.namedTypes.inSameFile.toTypeParameter.inEnumVariantsInNestedEnums fun myFunction1() diff --git a/tests/resources/scoping/named types/to type parameter/in global class/main.sdstest b/tests/resources/scoping/named types/in same file/to type parameters/in global classes/main.sdstest similarity index 90% rename from tests/resources/scoping/named types/to type parameter/in global class/main.sdstest rename to tests/resources/scoping/named types/in same file/to type parameters/in global classes/main.sdstest index a9bd632fa..593c53400 100644 --- a/tests/resources/scoping/named types/to type parameter/in global class/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to type parameters/in global classes/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toTypeParameter.inGlobalClass +package tests.scoping.namedTypes.inSameFile.toTypeParameter.inGlobalClasses fun myFunction1() diff --git a/tests/resources/scoping/named types/to type parameter/in global function/main.sdstest b/tests/resources/scoping/named types/in same file/to type parameters/in global functions/main.sdstest similarity index 89% rename from tests/resources/scoping/named types/to type parameter/in global function/main.sdstest rename to tests/resources/scoping/named types/in same file/to type parameters/in global functions/main.sdstest index c7f12ef13..a23203377 100644 --- a/tests/resources/scoping/named types/to type parameter/in global function/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to type parameters/in global functions/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toTypeParameter.inGlobalFunction +package tests.scoping.namedTypes.inSameFile.toTypeParameter.inGlobalFunctions fun myFunction1() diff --git a/tests/resources/scoping/named types/to type parameter/in method/main.sdstest b/tests/resources/scoping/named types/in same file/to type parameters/in methods/main.sdstest similarity index 96% rename from tests/resources/scoping/named types/to type parameter/in method/main.sdstest rename to tests/resources/scoping/named types/in same file/to type parameters/in methods/main.sdstest index 4fbf2bfb8..586f64614 100644 --- a/tests/resources/scoping/named types/to type parameter/in method/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to type parameters/in methods/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toTypeParameter.inMethod +package tests.scoping.namedTypes.inSameFile.toTypeParameter.inMethods fun myFunction1() diff --git a/tests/resources/scoping/named types/to type parameter/in nested class/main.sdstest b/tests/resources/scoping/named types/in same file/to type parameters/in nested classes/main.sdstest similarity index 96% rename from tests/resources/scoping/named types/to type parameter/in nested class/main.sdstest rename to tests/resources/scoping/named types/in same file/to type parameters/in nested classes/main.sdstest index e6f5056e4..7b1f2446a 100644 --- a/tests/resources/scoping/named types/to type parameter/in nested class/main.sdstest +++ b/tests/resources/scoping/named types/in same file/to type parameters/in nested classes/main.sdstest @@ -1,4 +1,4 @@ -package tests.scoping.namedTypes.toTypeParameter.inNestedClass +package tests.scoping.namedTypes.inSameFile.toTypeParameter.inNestedClasses fun myFunction1()