From 87aaa7c6a068eafb950beb0f340bbdddb46f7550 Mon Sep 17 00:00:00 2001 From: Eirik Tsarpalis Date: Wed, 20 Jul 2016 00:16:22 +0300 Subject: [PATCH] add tests that verify #12 is fixed --- paket.dependencies | 3 +- paket.lock | 14 +-- samples/ThunkServer/ThunkServer.fsproj | 34 +----- .../Vagabond.AssemblyParser.csproj | 83 +------------ src/Vagabond/Vagabond.fsproj | 115 +----------------- tests/Vagabond.Tests/FsiTests.fs | 21 +++- tests/Vagabond.Tests/Vagabond.Tests.fsproj | 64 ++-------- 7 files changed, 40 insertions(+), 294 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index e10ca2c..a60a363 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,3 +1,4 @@ +framework: >= net45 redirects: on source https://www.nuget.org/api/v2 @@ -5,7 +6,7 @@ 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 diff --git a/paket.lock b/paket.lock index 6d56fa3..41f2e47 100644 --- a/paket.lock +++ b/paket.lock @@ -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) @@ -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) \ No newline at end of file diff --git a/samples/ThunkServer/ThunkServer.fsproj b/samples/ThunkServer/ThunkServer.fsproj index a85d39d..c3aa4e4 100644 --- a/samples/ThunkServer/ThunkServer.fsproj +++ b/samples/ThunkServer/ThunkServer.fsproj @@ -90,37 +90,7 @@ --> - - - - ..\..\packages\FsPickler\lib\net35\FsPickler.dll - True - True - - - True - - - True - - - - - - - ..\..\packages\FsPickler\lib\net40\FsPickler.dll - True - True - - - True - - - True - - - - + ..\..\packages\FsPickler\lib\net45\FsPickler.dll @@ -137,7 +107,7 @@ - + ..\..\packages\Thespian\lib\net45\Thespian.dll diff --git a/src/Vagabond.AssemblyParser/Vagabond.AssemblyParser.csproj b/src/Vagabond.AssemblyParser/Vagabond.AssemblyParser.csproj index 20c3cda..e8fff7c 100644 --- a/src/Vagabond.AssemblyParser/Vagabond.AssemblyParser.csproj +++ b/src/Vagabond.AssemblyParser/Vagabond.AssemblyParser.csproj @@ -64,74 +64,7 @@ --> - - - - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Mdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Pdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Rocks.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.dll - True - True - - - - - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Mdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Pdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.dll - True - True - - - - - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Mdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Pdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Rocks.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.dll - True - True - - - - + ..\..\packages\Mono.Cecil\lib\net45\Mono.Cecil.Mdb.dll @@ -155,19 +88,5 @@ - - - - ..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.Rocks.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.dll - True - True - - - \ No newline at end of file diff --git a/src/Vagabond/Vagabond.fsproj b/src/Vagabond/Vagabond.fsproj index 747568e..ad527a3 100644 --- a/src/Vagabond/Vagabond.fsproj +++ b/src/Vagabond/Vagabond.fsproj @@ -102,37 +102,7 @@ --> - - - - ..\..\packages\FsPickler\lib\net35\FsPickler.dll - True - True - - - True - - - True - - - - - - - ..\..\packages\FsPickler\lib\net40\FsPickler.dll - True - True - - - True - - - True - - - - + ..\..\packages\FsPickler\lib\net45\FsPickler.dll @@ -149,74 +119,7 @@ - - - - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Mdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Pdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Rocks.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.dll - True - True - - - - - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Mdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Pdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.dll - True - True - - - - - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Mdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Pdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Rocks.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.dll - True - True - - - - + ..\..\packages\Mono.Cecil\lib\net45\Mono.Cecil.Mdb.dll @@ -240,19 +143,5 @@ - - - - ..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.Rocks.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.dll - True - True - - - \ No newline at end of file diff --git a/tests/Vagabond.Tests/FsiTests.fs b/tests/Vagabond.Tests/FsiTests.fs index 7fa15c4..08f093a 100644 --- a/tests/Vagabond.Tests/FsiTests.fs +++ b/tests/Vagabond.Tests/FsiTests.fs @@ -668,4 +668,23 @@ module FsiTests = """ fsi.EvalExpression "array.GetLength(0)" |> shouldEqual 5 - fsi.EvalExpression "array.GetLength(1)" |> shouldEqual 5 \ No newline at end of file + fsi.EvalExpression "array.GetLength(1)" |> shouldEqual 5 + + [] + 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>) = C.F x + """ + + fsi.EvalExpression "client.EvaluateThunk(fun () -> typeof)" |> shouldBe (fun x -> true) \ No newline at end of file diff --git a/tests/Vagabond.Tests/Vagabond.Tests.fsproj b/tests/Vagabond.Tests/Vagabond.Tests.fsproj index bf095ba..8a5dadd 100644 --- a/tests/Vagabond.Tests/Vagabond.Tests.fsproj +++ b/tests/Vagabond.Tests/Vagabond.Tests.fsproj @@ -91,7 +91,7 @@ --> - + ..\..\packages\FSharp.Compiler.Service\lib\net45\FSharp.Compiler.Service.dll @@ -102,7 +102,7 @@ - + ..\..\packages\FSharp.Data\lib\net40\FSharp.Data.dll @@ -111,48 +111,9 @@ - - - - ..\..\packages\FSharp.Data\lib\portable-net40+sl5+wp8+win8\FSharp.Data.dll - True - True - - - - - - - ..\..\packages\FsPickler\lib\net35\FsPickler.dll - True - True - - - True - - - True - - - - - - - ..\..\packages\FsPickler\lib\net40\FsPickler.dll - True - True - - - True - - - True - - - - + ..\..\packages\FsPickler\lib\net45\FsPickler.dll @@ -168,18 +129,11 @@ - - - ..\..\packages\NUnit\lib\nunit.framework.dll - True - True - - - + - - ..\..\packages\Thespian\lib\net45\Thespian.dll + + ..\..\packages\NUnit\lib\nunit.framework.dll True True @@ -187,10 +141,10 @@ - + - - ..\..\packages\Zlib.Portable\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll + + ..\..\packages\Thespian\lib\net45\Thespian.dll True True