Skip to content

Commit

Permalink
add tests that verify #12 is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriktsarpalis committed Jul 19, 2016
1 parent e844fa9 commit 87aaa7c
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 294 deletions.
3 changes: 2 additions & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
framework: >= net45
redirects: on
source https://www.nuget.org/api/v2

nuget FSharp.Core ~> 4.0
nuget FSharp.Data ~> 2.2.5
nuget FsPickler ~> 2.1.0
nuget LinqOptimizer.FSharp
nuget Mono.Cecil ~> 0.9.6.1
nuget Mono.Cecil ~> 0.9.6.3
nuget Thespian ~> 0.1.11-alpha
nuget FSharp.Compiler.Service ~> 5.0
nuget NUnit ~> 2.6
Expand Down
14 changes: 4 additions & 10 deletions paket.lock
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
REDIRECTS: ON
FRAMEWORK: >= NET45
NUGET
remote: https://www.nuget.org/api/v2
specs:
FSharp.Compiler.Service (5.0)
FSharp.Core (4.0.0.1)
FSharp.Data (2.2.5)
Zlib.Portable (>= 1.10) - framework: portable-net40+sl50+wp80+win80
FsPickler (2.1)
LinqOptimizer.FSharp (0.6.3)
MathNet.Numerics (3.7.1)
TaskParallelLibrary (>= 1.0.2856) - framework: net35
MathNet.Numerics.FSharp (3.7.1)
FSharp.Core (>= 3.1.2.1)
MathNet.Numerics (3.7.1)
MathNet.Numerics.MKL.Win-x64 (1.8)
MathNet.Numerics (>= 2.4)
Mono.Cecil (0.9.6.1)
Mono.Cecil (0.9.6.3)
NUnit (2.6.4)
NUnit.Runners (2.6.4)
TaskParallelLibrary (1.0.2856) - framework: net35
Thespian (0.1.11-alpha)
FsPickler (>= 2.1 < 3.0)
Zlib.Portable (1.11) - framework: portable-net40+sl50+wp80+win80

GROUP Build
NUGET
remote: https://www.nuget.org/api/v2
specs:
FAKE (4.29.2)
FAKE (4.32)
FSharp.Compiler.Service (2.0.0.6)
FSharp.Formatting (2.14.4)
FSharp.Compiler.Service (2.0.0.6)
Expand All @@ -45,6 +40,5 @@ NUGET
Microsoft.Net.Http - framework: net10, net11, net20, net30, net35, net40, net40-full
GITHUB
remote: fsharp/FAKE
specs:
modules/Octokit/Octokit.fsx (c56456abac6b744c3bb95b217687db19fd19b367)
modules/Octokit/Octokit.fsx (57b7731e3386ae98806970506ff731872f3c9260)
Octokit (>= 0.20)
34 changes: 2 additions & 32 deletions samples/ThunkServer/ThunkServer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,37 +90,7 @@
-->
<Import Project="..\..\.paket\paket.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v3.5'">
<ItemGroup>
<Reference Include="FsPickler">
<HintPath>..\..\packages\FsPickler\lib\net35\FsPickler.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="System.Runtime.Serialization">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Xml">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0')">
<ItemGroup>
<Reference Include="FsPickler">
<HintPath>..\..\packages\FsPickler\lib\net40\FsPickler.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="System.Runtime.Serialization">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Xml">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
<ItemGroup>
<Reference Include="FsPickler">
<HintPath>..\..\packages\FsPickler\lib\net45\FsPickler.dll</HintPath>
Expand All @@ -137,7 +107,7 @@
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
<ItemGroup>
<Reference Include="Thespian">
<HintPath>..\..\packages\Thespian\lib\net45\Thespian.dll</HintPath>
Expand Down
83 changes: 1 addition & 82 deletions src/Vagabond.AssemblyParser/Vagabond.AssemblyParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,74 +64,7 @@
-->
<Import Project="..\..\.paket\paket.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v3.5'">
<ItemGroup>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Mdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Pdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Pdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Rocks">
<HintPath>..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Rocks.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v2.0' Or $(TargetFrameworkVersion) == 'v3.0')">
<ItemGroup>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Mdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Pdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Pdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0')">
<ItemGroup>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Pdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Rocks">
<HintPath>..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
<ItemGroup>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net45\Mono.Cecil.Mdb.dll</HintPath>
Expand All @@ -155,19 +88,5 @@
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == 'Silverlight' And $(TargetFrameworkVersion) == 'v5.0'">
<ItemGroup>
<Reference Include="Mono.Cecil.Rocks">
<HintPath>..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.Rocks.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
</Project>
115 changes: 2 additions & 113 deletions src/Vagabond/Vagabond.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,37 +102,7 @@
-->
<Import Project="..\..\.paket\paket.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v3.5'">
<ItemGroup>
<Reference Include="FsPickler">
<HintPath>..\..\packages\FsPickler\lib\net35\FsPickler.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="System.Runtime.Serialization">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Xml">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0')">
<ItemGroup>
<Reference Include="FsPickler">
<HintPath>..\..\packages\FsPickler\lib\net40\FsPickler.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="System.Runtime.Serialization">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Xml">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
<ItemGroup>
<Reference Include="FsPickler">
<HintPath>..\..\packages\FsPickler\lib\net45\FsPickler.dll</HintPath>
Expand All @@ -149,74 +119,7 @@
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v3.5'">
<ItemGroup>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Mdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Pdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Pdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Rocks">
<HintPath>..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Rocks.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v2.0' Or $(TargetFrameworkVersion) == 'v3.0')">
<ItemGroup>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Mdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Pdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Pdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0')">
<ItemGroup>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Pdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil.Rocks">
<HintPath>..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
<ItemGroup>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\packages\Mono.Cecil\lib\net45\Mono.Cecil.Mdb.dll</HintPath>
Expand All @@ -240,19 +143,5 @@
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == 'Silverlight' And $(TargetFrameworkVersion) == 'v5.0'">
<ItemGroup>
<Reference Include="Mono.Cecil.Rocks">
<HintPath>..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.Rocks.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
</Project>
21 changes: 20 additions & 1 deletion tests/Vagabond.Tests/FsiTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -668,4 +668,23 @@ module FsiTests =
"""

fsi.EvalExpression "array.GetLength(0)" |> shouldEqual 5
fsi.EvalExpression "array.GetLength(1)" |> shouldEqual 5
fsi.EvalExpression "array.GetLength(1)" |> shouldEqual 5

[<Test>]
let ``30. Test against Cecil bug #278`` () =
// see https://github.com/jbevain/cecil/issues/278
let fsi = FsiSession.Value

fsi.EvalInteraction """
type A<'T> = class end
type B<'T,'U> = class end
type C =
static member G x : A<'T> = failwith ""
static member F x : A<'T> = C.G (fun () -> x)
type D =
static member F (x:A<B<_,_>>) = C.F x
"""

fsi.EvalExpression "client.EvaluateThunk(fun () -> typeof<D>)" |> shouldBe (fun x -> true)
Loading

0 comments on commit 87aaa7c

Please sign in to comment.