diff --git a/test/src/implementation.test.ts b/test/src/implementation.test.ts deleted file mode 100644 index 17b9bd47..00000000 --- a/test/src/implementation.test.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2024 Holger Dal Mogensen - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as assert from 'assert' -import * as vscode from 'vscode' -import { getTestDocUri, activate, normalizeLocation } from './util' - -suite('Find implementations', () => { - const dividableDocUri = getTestDocUri('src/Dividable.flix') - - suiteSetup(async () => { - await activate('implementation') - }) - - test('Empty line should not show anything', async () => { - const position = new vscode.Position(0, 0) - const r = await vscode.commands.executeCommand<(vscode.Location | vscode.LocationLink)[]>( - 'vscode.executeImplementationProvider', - dividableDocUri, - position, - ) - assert.deepStrictEqual(r, []) - }) - - async function testImplementations(uri: vscode.Uri, position: vscode.Position, expectedLocations: vscode.Location[]) { - const r = await vscode.commands.executeCommand<(vscode.Location | vscode.LocationLink)[]>( - 'vscode.executeImplementationProvider', - uri, - position, - ) - - const actualLocations = r.map(normalizeLocation) - - assert.deepStrictEqual(actualLocations.sort(), expectedLocations.sort()) - } - - test('Find Dividable trait implementation', async () => { - await testImplementations(dividableDocUri, new vscode.Position(5, 6), [ - new vscode.Location(dividableDocUri, new vscode.Range(10, 9, 10, 18)), - ]) - }) -}) diff --git a/test/testWorkspaces/implementation/flix.toml b/test/testWorkspaces/implementation/flix.toml deleted file mode 100644 index 16cfc76b..00000000 --- a/test/testWorkspaces/implementation/flix.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "vscode-flix-test" -description = "test" -version = "0.1.0" -flix = "0.44.0" -authors = ["John Doe <john@example.com>"] diff --git a/test/testWorkspaces/implementation/src/Dividable.flix b/test/testWorkspaces/implementation/src/Dividable.flix deleted file mode 100644 index 4464e922..00000000 --- a/test/testWorkspaces/implementation/src/Dividable.flix +++ /dev/null @@ -1,15 +0,0 @@ - -eff DivByZero { - pub def throw(): Void -} - -trait Dividable[t] { - type Aef: Eff - pub def div(x: t, y: t): t \ Dividable.Aef[t] -} - -instance Dividable[Int32] { - type Aef = DivByZero - pub def div(x: Int32, y: Int32): Int32 \ DivByZero = - if (y == 0) do DivByZero.throw() else x / y -}