Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81f6bbb

Browse files
committed
Fix remaining ideunit tests.
1 parent9f9f0d0 commit81f6bbb

File tree

10 files changed

+95
-14
lines changed

10 files changed

+95
-14
lines changed

‎vsintegration/src/Salsa/Salsa.fsproj‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
<NoWarn>$(NoWarn);45;47;52;58;75</NoWarn>
1919
<DefineConstants>FX_ATLEAST_45;$(DefineConstants)</DefineConstants>
2020
</PropertyGroup>
21+
<PropertyGroup>
22+
<DefineConstantsCondition=" '$(VisualStudioVersion)' == '12.0'">$(DefineConstants);VS_VERSION_DEV12</DefineConstants>
23+
<DefineConstantsCondition=" '$(VisualStudioVersion)' == '14.0'">$(DefineConstants);VS_VERSION_DEV14</DefineConstants>
24+
</PropertyGroup>
2125
<ItemGroup>
2226
<CompileInclude="$(FSharpSourcesRoot)\utils\CompilerLocationUtils.fs" />
2327
<CompileInclude="..\unittests\TestLib.Utils.fs">

‎vsintegration/src/Salsa/VsMocks.fs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,11 @@ module internal VsActual =
16351635
openMicrosoft.VisualStudio.Text
16361636

16371637
letvsInstallDir=
1638+
#if VS_VERSION_DEV14
16381639
letkey=@"SOFTWARE\Microsoft\VisualStudio\14.0"
1640+
#else
1641+
letkey=@"SOFTWARE\Microsoft\VisualStudio\12.0"
1642+
#endif
16391643
lethklm= Microsoft.Win32.RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, Microsoft.Win32.RegistryView.Registry32)
16401644
letrkey= hklm.OpenSubKey(key)
16411645
rkey.GetValue("InstallDir"):?> string

‎vsintegration/src/unittests/Tests.LanguageService.Script.fs‎

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -567,11 +567,12 @@ type ScriptTests() as this =
567567

568568
[<Test>]
569569
[<Category("fsx closure")>]
570-
// 'Microsoft.TeamFoundation.Diff' is located via AssemblyFoldersEx
570+
571+
// Nunit still registers itself in AssemblyFoldersEx so try to locate it. And we know that nunit exists on a machine running tests
571572
memberpublicthis.``Fsx.NoError.HashR.ResolveFromAssemblyFoldersEx``()=
572573
letfileContent="""
573574
#light
574-
#r "Microsoft.TeamFoundation.Diff"
575+
#r "nunit.framework.dll"
575576
"""
576577
this.VerifyFSXNoErrorList(fileContent)
577578

@@ -902,11 +903,11 @@ type ScriptTests() as this =
902903

903904
[<Test>]
904905
[<Category("fsx closure")>]
905-
memberpublicthis.``Fsx.HashR_QuickInfo.ResolveFromAssemblyFoldersEx``()=
906-
letfileContent="""#r "Microsoft.TeamFoundation.Diff""""// 'Microsoft.TeamFoundation.Diff' is located via AssemblyFoldersEx
907-
letmarker="#r\"Microsoft.Tea"
908-
this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker"Found by AssemblyFoldersEx registry key"
909-
this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker"Microsoft.TeamFoundation.Diff"
906+
memberpublicthis.``Fsx.HashR_QuickInfo.ResolveFromAssemblyFoldersEx``()=
907+
letfileContent="""#r "nunit.framework.dll""""// 'nunit.framework.dll' is located via AssemblyFoldersEx
908+
letmarker="#r\"nunit.fra"
909+
this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker"nunit.framework, Version="
910+
this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker"nunit.framework.dll"
910911

911912
[<Test>]
912913
[<Category("fsx closure")>]
@@ -1298,17 +1299,31 @@ type ScriptTests() as this =
12981299
letsolution= this.CreateSolution()
12991300
letproject= CreateProject(solution,"testproject")
13001301
#if FX_ATLEAST_45
1302+
#if VS_VERSION_DEV12
1303+
PlaceIntoProjectFileBeforeImport
1304+
(project,@"
1305+
<ItemGroup>
1306+
<!-- Subtle: You need this reference to compile but not to get language service -->
1307+
<Reference Include=""FSharp.Compiler.Interactive.Settings, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"">
1308+
<SpecificVersion>True</SpecificVersion>
1309+
</Reference>
1310+
<Reference Include=""FSharp.Compiler, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"">
1311+
<SpecificVersion>True</SpecificVersion>
1312+
</Reference>
1313+
</ItemGroup>")
1314+
#else
13011315
PlaceIntoProjectFileBeforeImport
13021316
(project,@"
13031317
<ItemGroup>
13041318
<!-- Subtle: You need this reference to compile but not to get language service -->
1305-
<Reference Include=""FSharp.Compiler.Interactive.Settings, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"">
1319+
<Reference Include=""FSharp.Compiler.Interactive.Settings, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"">
13061320
<SpecificVersion>True</SpecificVersion>
13071321
</Reference>
1308-
<Reference Include=""FSharp.Compiler, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"">
1322+
<Reference Include=""FSharp.Compiler, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"">
13091323
<SpecificVersion>True</SpecificVersion>
13101324
</Reference>
13111325
</ItemGroup>")
1326+
#endif
13121327
#else
13131328
PlaceIntoProjectFileBeforeImport
13141329
(project,@"

‎vsintegration/src/unittests/Unittests.dll.config‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
<assemblyIdentityname="Microsoft.VisualStudio.Shell.10.0"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
1919
<bindingRedirectoldVersion="2.0.0.0-10.0.0.0"newVersion="11.0.0.0"/>
2020
</dependentAssembly>
21+
<dependentAssembly>
22+
<assemblyIdentityname="Microsoft.Build.Framework"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
23+
<bindingRedirectoldVersion="2.0.0.0-14.0.0.0"newVersion="14.0.0.0"/>
24+
</dependentAssembly>
25+
<dependentAssembly>
26+
<assemblyIdentityname="Microsoft.Build.Utilities"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
27+
<bindingRedirectoldVersion="2.0.0.0-14.0.0.0"newVersion="14.0.0.0"/>
28+
</dependentAssembly>
2129
<dependentAssembly>
2230
<assemblyIdentityname="FSharp.Core"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
2331
<bindingRedirectoldVersion="2.0.0.0-4.4.0.0"newVersion="4.4.0.9055"/>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.-->
3+
<configuration>
4+
<appSettings>
5+
<addkey="fsharp-compiler-location"value="{FinalDir}" />
6+
</appSettings>
7+
<runtime>
8+
<assemblyBindingxmlns="urn:schemas-microsoft-com:asm.v1">
9+
<dependentAssembly>
10+
<assemblyIdentityname="EnvDTE"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
11+
<bindingRedirectoldVersion="7.0.3300.0"newVersion="8.0.0.0"/>
12+
</dependentAssembly>
13+
<dependentAssembly>
14+
<assemblyIdentityname="Microsoft.VisualStudio.Package.LanguageService.10.0"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
15+
<bindingRedirectoldVersion="2.0.0.0-11.0.0.0"newVersion="10.0.0.0"/>
16+
</dependentAssembly>
17+
<dependentAssembly>
18+
<assemblyIdentityname="Microsoft.VisualStudio.Shell.10.0"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
19+
<bindingRedirectoldVersion="2.0.0.0-10.0.0.0"newVersion="11.0.0.0"/>
20+
</dependentAssembly>
21+
<dependentAssembly>
22+
<assemblyIdentityname="Microsoft.Build.Framework"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
23+
<bindingRedirectoldVersion="2.0.0.0-12.0.0.0"newVersion="12.0.0.0"/>
24+
</dependentAssembly>
25+
<dependentAssembly>
26+
<assemblyIdentityname="Microsoft.Build.Utilities"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
27+
<bindingRedirectoldVersion="2.0.0.0-12.0.0.0"newVersion="12.0.0.0"/>
28+
</dependentAssembly>
29+
<dependentAssembly>
30+
<assemblyIdentityname="FSharp.Core"publicKeyToken="b03f5f7f11d50a3a"culture="neutral"/>
31+
<bindingRedirectoldVersion="2.0.0.0-4.4.0.0"newVersion="4.4.0.9055"/>
32+
</dependentAssembly>
33+
</assemblyBinding>
34+
</runtime>
35+
</configuration>

‎vsintegration/src/unittests/Unittests.fsproj‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
<NoWarn>58;75</NoWarn>
2020
<PlatformTarget>x86</PlatformTarget>
2121
</PropertyGroup>
22+
<PropertyGroup>
23+
<DefineConstantsCondition=" '$(VisualStudioVersion)' == '12.0'">$(DefineConstants);VS_VERSION_DEV12</DefineConstants>
24+
<DefineConstantsCondition=" '$(VisualStudioVersion)' == '14.0'">$(DefineConstants);VS_VERSION_DEV14</DefineConstants>
25+
</PropertyGroup>
2226
<ItemGroup>
2327
<CompileInclude="$(FSharpSourcesRoot)\fsharp\InternalCollections.fsi">
2428
<Link>Internal.Utilities.Collections.fsi</Link>
@@ -63,7 +67,10 @@
6367
<CompileInclude="Tests.ProjectSystem.References.fs" />
6468
<CompileInclude="Tests.ProjectSystem.RoundTrip.fs" />
6569
<CompileInclude="Tests.ProjectSystem.UpToDate.fs" />
66-
<CustomCopyLocalInclude="Unittests.dll.config">
70+
<CustomCopyLocalInclude="Unittests.dll.config"Condition="'$(VisualStudioVersion)' == '14.0'">
71+
<TargetFilename>Unittests.dll.config</TargetFilename>
72+
</CustomCopyLocal>
73+
<CustomCopyLocalInclude="Unittests.dll.v12.config"Condition="'$(VisualStudioVersion)' == '12.0'">
6774
<TargetFilename>Unittests.dll.config</TargetFilename>
6875
</CustomCopyLocal>
6976
</ItemGroup>

‎vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/IDEBuildLogger.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem
2121
{
2222
publicstaticclassLoggingConstants
2323
{
24+
#ifVS_VERSION_DEV14
2425
publicconststringDefaultVSRegistryRoot=@"Software\Microsoft\VisualStudio\14.0";
26+
#else
27+
publicconststringDefaultVSRegistryRoot=@"Software\Microsoft\VisualStudio\12.0";
28+
#endif
2529
publicconststringBuildVerbosityRegistrySubKey=@"General";
2630
publicconststringBuildVerbosityRegistryValue="MSBuildLoggerVerbosity";
2731
publicconststringUpToDateVerbosityRegistryValue="U2DCheckVerbosity";

‎vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectConfig.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,11 @@ public class BuildableProjectConfig : IVsBuildableProjectCfg
16581658
{
16591659

16601660
#ifFX_ATLEAST_45
1661+
#ifVS_VERSION_DEV14
16611662
privatestaticstringRegistryRoot=@"SOFTWARE\Microsoft\VisualStudio\14.0\";
1663+
#else
1664+
privatestaticstringRegistryRoot=@"SOFTWARE\Microsoft\VisualStudio\12.0\";
1665+
#endif
16621666
privatestaticbool?isMultiThreadedBuildEnabled=null;
16631667
internalstaticboolIsMultiThreadedBuildEnabled()
16641668
{

‎vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectNode.cs‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3567,10 +3567,6 @@ internal virtual BuildSubmission DoMSBuildSubmission(BuildKind buildKind, string
35673567
varsessionGuid=sqm.GetGlobalSessionGuid();
35683568
projectInstance.SetProperty(GlobalProperty.SqmSessionGuid.ToString(),sessionGuid.ToString());
35693569
}
3570-
else
3571-
{
3572-
Debug.Assert(false,"Could not retrieve SQM service from the service provider");
3573-
}
35743570

35753571
if(extraProperties!=null)
35763572
{

‎vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectSystem.Base.csproj‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
<StrongNames>true</StrongNames>
3939
<DelaySign>true</DelaySign>
4040
</PropertyGroup>
41+
<PropertyGroup>
42+
<DefineConstantsCondition=" '$(VisualStudioVersion)' == '12.0'">$(DefineConstants);VS_VERSION_DEV12</DefineConstants>
43+
<DefineConstantsCondition=" '$(VisualStudioVersion)' == '14.0'">$(DefineConstants);VS_VERSION_DEV14</DefineConstants>
44+
</PropertyGroup>
4145
<ItemGroup>
4246
<ReferenceInclude="$(MsBuild_FrameworkReference)" />
4347
<ReferenceInclude="$(MsBuild_EngineReference)" />

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp