Skip to content

Commit

Permalink
Failing test for GetTargetFramework().
Browse files Browse the repository at this point in the history
It fails for silverlight 5 project.

related to #751, #1718
  • Loading branch information
freeman committed Jun 6, 2016
1 parent 69f8004 commit e8c43f7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions tests/Paket.Tests/ProjectFile/TargetFrameworkSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,33 @@ open FsUnit

let TestData: obj[][] =
[|
// project file name, expected TargetProfile
// project file name,
// expected TargetProfile
// expected TargetProfile.ToString
// expected TargetFramework
[|"Project2.fsprojtest";
(SinglePlatform(DotNetFramework FrameworkVersion.V4_Client));
"net40"|];
"net40";
(Some(DotNetFramework FrameworkVersion.V4_Client))|];
[|"Empty.fsprojtest";
(SinglePlatform(DotNetFramework FrameworkVersion.V4));
"net40-full"|];
"net40-full";
(Some(DotNetFramework FrameworkVersion.V4))|];
[|"NewSilverlightClassLibrary.csprojtest";
(SinglePlatform(Silverlight("v5.0")));
"sl50"|];
"sl50";
(Some(Silverlight "v5.0"))|];
[|"FSharp.Core.Fluent-3.1.fsprojtest";
(PortableProfile("Profile259", [ DotNetFramework FrameworkVersion.V4_5; Windows "v4.5"; WindowsPhoneSilverlight "v8.0"; WindowsPhoneApp "v8.1" ]));
"portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"|];
"portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1";
(Some(DotNetFramework FrameworkVersion.V4_5))|];
|]

[<Test>]
[<TestCaseSource("TestData")>]
let ``should detect the correct framework on test projects`` projectFile expectedProfile expectedProfileString =
let ``should detect the correct framework on test projects`` projectFile expectedProfile expectedProfileString expectedTargetFramework =
let p = ProjectFile.TryLoad("./ProjectFile/TestData/" + projectFile).Value
p.GetTargetProfile() |> shouldEqual expectedProfile
p.GetTargetProfile().ToString() |> shouldEqual expectedProfileString
p.GetTargetFramework() |> shouldEqual expectedTargetFramework

0 comments on commit e8c43f7

Please sign in to comment.