From e57d4f9fa2d5dba5817e8e4bcf576a63286507d8 Mon Sep 17 00:00:00 2001 From: Mehrshad Date: Thu, 8 Feb 2024 13:46:46 +0330 Subject: [PATCH] tests: refactoring for DRY principle --- tests/FSharpLint.Benchmarks/Benchmark.fs | 3 +-- tests/FSharpLint.FunctionalTest/TestApi.fs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/FSharpLint.Benchmarks/Benchmark.fs b/tests/FSharpLint.Benchmarks/Benchmark.fs index 4bec7ca83..63f5e703c 100644 --- a/tests/FSharpLint.Benchmarks/Benchmark.fs +++ b/tests/FSharpLint.Benchmarks/Benchmark.fs @@ -6,6 +6,7 @@ open FSharp.Compiler.CodeAnalysis open FSharp.Compiler.Text open FSharpLint.Application.Lint open FSharpLint.Framework +open FSharpLint.Framework.Utilities type Benchmark () = @@ -23,8 +24,6 @@ type Benchmark () = parseResults.ParseTree - let () basePath relativePath = Path.Combine(basePath, relativePath) - let basePath = ".." ".." ".." ".." ".." ".." ".." ".." let sourceFile = basePath "TypeChecker.fs" diff --git a/tests/FSharpLint.FunctionalTest/TestApi.fs b/tests/FSharpLint.FunctionalTest/TestApi.fs index c473dd816..12ce160cb 100644 --- a/tests/FSharpLint.FunctionalTest/TestApi.fs +++ b/tests/FSharpLint.FunctionalTest/TestApi.fs @@ -8,8 +8,7 @@ module TestApi = open FSharpLint.Application.Lint open FSharp.Compiler.CodeAnalysis open FSharp.Compiler.Text - - let () basePath relativePath = Path.Combine(basePath, relativePath) + open FSharpLint.Framework.Utilities let basePath = TestContext.CurrentContext.TestDirectory ".." ".." ".." ".." ".."