Skip to content

Commit 2e6b5d1

Browse files
committed
test: ensure FCS is not referenced by FSharpLint.Client
1 parent c9d841b commit 2e6b5d1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/FSharpLint.Client.Tests/FSharpLint.Client.Tests.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<IsPackable>false</IsPackable>
55
</PropertyGroup>
66
<ItemGroup>
7+
<Compile Include="ReferenceTests.fs" />
78
<Compile Include="TestClient.fs" />
89
</ItemGroup>
910
<ItemGroup>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module FSharpLint.Client.ReferenceTests
2+
3+
open NUnit.Framework
4+
open System.IO
5+
open System
6+
7+
[<Test>]
8+
let ``FSharpLint.Client should not reference FSharpLint.Core``() =
9+
try
10+
System.Activator.CreateInstanceFrom("FSharp.Compiler.Service.dll", "FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults")
11+
|> ignore
12+
with
13+
| :? FileNotFoundException as e -> () // dll is missing, what we want
14+
| :? MissingMethodException as e -> Assert.Fail() // ctor is missing, dll was found

0 commit comments

Comments
 (0)