Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
fdbcd9c0
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
fdbcd9c0
编写于
1月 30, 2019
作者:
B
Brett V. Forsgren
提交者:
GitHub
1月 30, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Test fixes (#6164)
上级
03d0c317
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
117 addition
and
47 deletion
+117
-47
tests/fsharp/single-test.fs
tests/fsharp/single-test.fs
+4
-0
tests/fsharpqa/Source/Conformance/PatternMatching/Named/env.lst
...fsharpqa/Source/Conformance/PatternMatching/Named/env.lst
+1
-1
vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs
vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs
+0
-12
vsintegration/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fsproj
...tion/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fsproj
+1
-0
vsintegration/tests/Salsa/salsa.fs
vsintegration/tests/Salsa/salsa.fs
+2
-2
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs
...LegacyLanguageService/Tests.LanguageService.Completion.fs
+7
-0
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs
.../LegacyLanguageService/Tests.LanguageService.ErrorList.fs
+1
-0
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs
...acyLanguageService/Tests.LanguageService.ParameterInfo.fs
+33
-0
vsintegration/tests/UnitTests/Tests.Build.fs
vsintegration/tests/UnitTests/Tests.Build.fs
+67
-32
vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
+1
-0
未找到文件。
tests/fsharp/single-test.fs
浏览文件 @
fdbcd9c0
...
...
@@ -130,6 +130,8 @@ let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework =
<DefineConstants>FX_RESHAPED_REFLECTION</DefineConstants>
<DefineConstants Condition=""'$(OutputType)' == 'Script' and '$(FSharpTestCompilerVersion)' == 'coreclr'"">NETCOREAPP</DefineConstants>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RestoreAdditionalProjectSources Condition = "" '$(RestoreAdditionalProjectSources)' == ''"">$(RestoreFromArtifactsPath)</RestoreAdditionalProjectSources>
<RestoreAdditionalProjectSources Condition = "" '$(RestoreAdditionalProjectSources)' != ''"">$(RestoreAdditionalProjectSources);$(RestoreFromArtifactsPath)</RestoreAdditionalProjectSources>
</PropertyGroup>
<!-- Utility sources -->
...
...
@@ -170,6 +172,8 @@ let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework =
|>
replaceTokens
"$(OPTIMIZE)"
optimize
|>
replaceTokens
"$(DEBUG)"
debug
|>
replaceTokens
"$(TARGETFRAMEWORK)"
targetFramework
|>
replaceTokens
"$(RestoreFromArtifactsPath)"
(
Path
.
GetFullPath
(__
SOURCE_DIRECTORY__
)
+
"/../../artifacts"
)
generateProjBody
let
singleTestBuildAndRunCore
cfg
copyFiles
p
=
...
...
tests/fsharpqa/Source/Conformance/PatternMatching/Named/env.lst
浏览文件 @
fdbcd9c0
...
...
@@ -21,7 +21,7 @@
SOURCE=activePatterns07.fs # activePatterns07.fs
SOURCE=activePatterns08.fs # activePatterns08.fs
SOURCE=AsHighOrderFunc01.fs # AsHighOrderFunc01.fs
# SOURCE=AsHighOrderFunc01.fs # AsHighOrderFunc01.fs ### FAils on coreclr 2.1.500
SOURCE=RecursiveActivePats.fs # RecursiveActivePats.fs
SOURCE=E_ActivePatterns01.fs # E_ActivePatterns01.fs
...
...
vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs
浏览文件 @
fdbcd9c0
...
...
@@ -1263,18 +1263,6 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem
// This is the first time, so set up interface for language service to talk to us
projectSite.Open(x.CreateRunningProjectSite())
// =====================================================================================================
// Todo: x.Compile(compile:System.Converter<int,int>, flags:string[], sources:string[]) for VS2017.7
// Earlier buildtasks usesd System.Converter<int,int> for cross platform we are moving to Func<int>
// This is so that during the interim, earlier VS's will still load the OSS project
// =====================================================================================================
member x.Compile(compile:System.Converter<int,int>, flags:string[], sources:string[]) =
x.CoreCompile(flags, sources)
if actuallyBuild then
compile.Invoke(0)
else
0
member x.Compile(compile:Func<int>, flags:string[], sources:string[]) =
x.CoreCompile(flags, sources)
if actuallyBuild then
...
...
vsintegration/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fsproj
浏览文件 @
fdbcd9c0
...
...
@@ -9,6 +9,7 @@
<EnableDefaultEmbeddedResourceItems>
false
</EnableDefaultEmbeddedResourceItems>
<NoMsbuild>
true
</NoMsbuild>
<AutoGenerateBindingRedirects>
true
</AutoGenerateBindingRedirects>
<IsTestProject>
true
</IsTestProject>
</PropertyGroup>
<ItemGroup>
...
...
vsintegration/tests/Salsa/salsa.fs
浏览文件 @
fdbcd9c0
...
...
@@ -43,11 +43,11 @@ module internal Salsa =
{
new
System
.
IDisposable
with
member
this
.
Dispose
()
=
actuallyBuild
<-
true
}
member
th
.
Results
=
capturedFlags
,
capturedSources
member
th
.
Compile
(
compile
:
System
.
Converter
<
int
,
int
>,
flags
:
string
[]
,
sources
:
string
[]
)
=
member
th
.
Compile
(
compile
:
System
.
Func
<
int
>,
flags
:
string
[]
,
sources
:
string
[]
)
=
capturedFlags
<-
flags
capturedSources
<-
sources
if
actuallyBuild
then
compile
.
Invoke
(
0
)
compile
.
Invoke
()
else
0
interface
ITaskHost
...
...
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs
浏览文件 @
fdbcd9c0
...
...
@@ -1528,6 +1528,7 @@ let x = new MyClass2(0)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``AfterConstructor.5039_1``
()
=
AssertAutoCompleteContainsNoCoffeeBreak
[
"let someCall(x) = null"
...
...
@@ -1537,6 +1538,7 @@ let x = new MyClass2(0)
[
"LastIndexOfAny"
]
// should not contain (String)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``AfterConstructor.5039_1.CoffeeBreak``
()
=
AssertAutoCompleteContains
[
"let someCall(x) = null"
...
...
@@ -2494,6 +2496,7 @@ let x = new MyClass2(0)
[<
Test
>]
[<
Category
(
"QueryExpressions"
)>]
[<
Category
(
"Expensive"
)>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
this
.
``QueryExpressions.QueryAndSequenceExpressionWithForYieldLoopSystematic``
()
=
let
prefix
=
"""
...
...
@@ -2595,6 +2598,7 @@ let aaaaaa = 0
[<
Test
>]
[<
Category
(
"QueryExpressions"
)>]
[<
Category
(
"Expensive"
)>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
/// Incrementally enter query with a 'join' and check for availability of quick info, auto completion and dot completion
member
this
.
``QueryAndOtherExpressions.WordByWordSystematicJoinQueryOnSingleLine``
()
=
...
...
@@ -2649,6 +2653,7 @@ let aaaaaa = 0
/// This is a sanity check that the multiple-line case is much the same as the single-line cae
[<
Category
(
"QueryExpressions"
)>]
[<
Category
(
"Expensive"
)>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
this
.
``QueryAndOtherExpressions.WordByWordSystematicJoinQueryOnMultipleLine``
()
=
let
prefix
=
"""
...
...
@@ -4881,6 +4886,7 @@ let x = query { for bbbb in abbbbc(*D0*) do
gpatcc
.
AssertExactly
(
0
,
0
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
this
.
``BadCompletionAfterQuicklyTyping.Bug72561.Noteworthy.NowWorks``
()
=
let
code
=
[
"123 "
]
let
(_,
_,
file
)
=
this
.
CreateSingleFileProject
(
code
)
...
...
@@ -4903,6 +4909,7 @@ let x = query { for bbbb in abbbbc(*D0*) do
gpatcc
.
AssertExactly
(
0
,
0
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
this
.
``BadCompletionAfterQuicklyTyping.Bug130733.NowWorks``
()
=
let
code
=
[
"let someCall(x) = null"
"let xe = someCall(System.IO.StringReader() "
]
...
...
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs
浏览文件 @
fdbcd9c0
...
...
@@ -540,6 +540,7 @@ but here has type
Assert
.
IsTrue
(
errorList
.
IsEmpty
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``UnicodeCharactors``
()
=
use
_
guard
=
this
.
UsingNewVS
()
let
solution
=
this
.
CreateSolution
()
...
...
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs
浏览文件 @
fdbcd9c0
...
...
@@ -253,6 +253,7 @@ type UsingMSBuild() =
this
.
VerifyHasParameterInfo
(
fileContent
,
"(*Mark*)"
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.DotNet.StaticMethod``
()
=
let
code
=
[
"#light"
...
...
@@ -425,6 +426,7 @@ type UsingMSBuild() =
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.InMatchClause``
()
=
let
v461
=
Version
(
4
,
6
,
1
)
let
fileContent
=
"""
...
...
@@ -606,6 +608,7 @@ type UsingMSBuild() =
// Test PI does not pop up after non-parameterized properties and after values
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Locations.EndOfFile``
()
=
this
.
TestSystematicParameterInfo
(
"System.Console.ReadLine("
,
[
[]
])
...
...
@@ -644,37 +647,47 @@ type UsingMSBuild() =
let
sevenTimes
l
=
[
l
;
l
;
l
;
l
;
l
;
l
;
l
]
this
.
TestGenericParameterInfo
(
"typeof<int>("
,
[]
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.MathAbs``
()
=
let
sevenTimes
l
=
[
l
;
l
;
l
;
l
;
l
;
l
;
l
]
this
.
TestGenericParameterInfo
(
"Math.Abs("
,
sevenTimes
[
"value"
])
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.ExchangeInt``
()
=
let
sevenTimes
l
=
[
l
;
l
;
l
;
l
;
l
;
l
;
l
]
this
.
TestGenericParameterInfo
(
"Interlocked.Exchange<int>("
,
sevenTimes
[
"location1"
;
"value"
])
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.Exchange``
()
=
let
sevenTimes
l
=
[
l
;
l
;
l
;
l
;
l
;
l
;
l
]
this
.
TestGenericParameterInfo
(
"Interlocked.Exchange("
,
sevenTimes
[
"location1"
;
"value"
])
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.ExchangeUnder``
()
=
let
sevenTimes
l
=
[
l
;
l
;
l
;
l
;
l
;
l
;
l
]
this
.
TestGenericParameterInfo
(
"Interlocked.Exchange<_> ("
,
sevenTimes
[
"location1"
;
"value"
])
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.Dictionary``
()
=
this
.
TestGenericParameterInfo
(
"System.Collections.Generic.Dictionary<_, option<int>>("
,
[
[]
;
[
"capacity"
];
[
"comparer"
];
[
"capacity"
;
"comparer"
];
[
"dictionary"
];
[
"dictionary"
;
"comparer"
]
])
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.List``
()
=
this
.
TestGenericParameterInfo
(
"new System.Collections.Generic.List< _ > ( "
,
[
[]
;
[
"capacity"
];
[
"collection"
]
])
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.ListInt``
()
=
this
.
TestGenericParameterInfo
(
"System.Collections.Generic.List<int>("
,
[
[]
;
[
"capacity"
];
[
"collection"
]
])
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.EventHandler``
()
=
this
.
TestGenericParameterInfo
(
"new System.EventHandler( "
,
[
[
""
]
])
// function arg doesn't have a name
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.EventHandlerEventArgs``
()
=
this
.
TestGenericParameterInfo
(
"System.EventHandler<EventArgs>("
,
[
[
""
]
])
// function arg doesn't have a name
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Generics.EventHandlerEventArgsNew``
()
=
this
.
TestGenericParameterInfo
(
"new System.EventHandler<EventArgs> ( "
,
[
[
""
]
])
// function arg doesn't have a name
...
...
@@ -747,6 +760,7 @@ type UsingMSBuild() =
this
.
TestParameterInfoLocation
(
"let a = Interlocked.Exchange($"
,
8
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Single.Locations.WithGenericArgs``
()
=
this
.
TestParameterInfoLocation
(
"Interlocked.Exchange<int>($"
,
0
)
...
...
@@ -769,6 +783,7 @@ type UsingMSBuild() =
[<
Test
>]
[<
Category
(
"TypeProvider"
)>]
[<
Category
(
"TypeProvider.StaticParameters"
)>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
//This test verifies that ParamInfo location on a provided type with namespace that exposes static parameter that takes >1 argument works normally.
member
public
this
.
``TypeProvider.Type.ParameterInfoLocation.WithNamespace``
()
=
this
.
TestParameterInfoLocation
(
"type boo = N1.T<$"
,
11
,
...
...
@@ -777,6 +792,7 @@ type UsingMSBuild() =
[<
Test
>]
[<
Category
(
"TypeProvider"
)>]
[<
Category
(
"TypeProvider.StaticParameters"
)>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
//This test verifies that ParamInfo location on a provided type without the namespace that exposes static parameter that takes >1 argument works normally.
member
public
this
.
``TypeProvider.Type.ParameterInfoLocation.WithOutNamespace``
()
=
this
.
TestParameterInfoLocation
(
"open N1
\n
"
+
"type boo = T<$"
,
...
...
@@ -869,6 +885,7 @@ type UsingMSBuild() =
(
"// System.Console.WriteLine($)"
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
this
.
``Regression.LocationOfParams.AfterQuicklyTyping.Bug91373``
()
=
let
code
=
[
"let f x = x "
"let f1 y = y "
...
...
@@ -893,6 +910,7 @@ type UsingMSBuild() =
AssertEqual
([|(
2
,
10
);(
2
,
12
);(
2
,
13
);(
3
,
0
)|],
info
.
GetNoteworthyParamInfoLocations
()
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
this
.
``LocationOfParams.AfterQuicklyTyping.CallConstructor``
()
=
let
code
=
[
"type Foo() = class end"
]
let
(_,
_,
file
)
=
this
.
CreateSingleFileProject
(
code
)
...
...
@@ -1058,6 +1076,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
()
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``Regression.LocationOfParams.Bug91479``
()
=
this
.
TestParameterInfoLocationOfParams
(
"""let z = fun x -> x + ^System.Int16.Parse^(^$ """
,
markAtEOF
=
true
)
...
...
@@ -1183,6 +1202,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
^l.Aggregate^(^$^) // was once a bug"""
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``LocationOfParams.BY_DESIGN.WayThatMismatchedParensFailOver.Case1``
()
=
// when only one 'statement' after the mismatched parens after a comma, the comma swallows it and it becomes a badly-indented
// continuation of the expression from the previous line
...
...
@@ -1194,6 +1214,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
c.M(1,2,3,4)"""
,
markAtEOF
=
true
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``LocationOfParams.BY_DESIGN.WayThatMismatchedParensFailOver.Case2``
()
=
// when multiple 'statements' after the mismatched parens after a comma, the parser sees a single argument to the method that
// is a statement sequence, e.g. a bunch of discarded expressions. That is,
...
...
@@ -1227,6 +1248,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
^System.Console.WriteLine^(^ $(42,43) ^) // oops"""
)
[<
Test
>]
[<
Ignore
(
"https://github.com/Microsoft/visualfsharp/issues/6166"
)>]
member
public
this
.
``LocationOfParams.Tuples.Bug123219``
()
=
this
.
TestParameterInfoLocationOfParams
(
"""
type Expr = | Num of int
...
...
@@ -1427,6 +1449,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
let
x
=
10
""")
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``LocationOfParams.QueryCustomOperation.Bug222128``() =
this.TestParameterInfoLocationOfParams("""
type
T
()
=
...
...
@@ -1541,6 +1564,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``LocationOfParams.TypeProviders.Prefix0``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type
U
=
^
N1
.
T
^<^
$
""", // missing all params, just have <
...
...
@@ -1548,6 +1572,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"
DummyProviderForLanguageServiceTesting
.
dll
")])
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``LocationOfParams.TypeProviders.Prefix1``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type
U
=
^
N1
.
T
^<^
"fo$o"
,^
42
""", // missing >
...
...
@@ -1555,6 +1580,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"
DummyProviderForLanguageServiceTesting
.
dll
")])
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``LocationOfParams.TypeProviders.Prefix1Named``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type
U
=
^
N1
.
T
^<^
"fo$o"
,^
ParamIgnored
=
42
""", // missing >
...
...
@@ -1562,6 +1588,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"
DummyProviderForLanguageServiceTesting
.
dll
")])
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``LocationOfParams.TypeProviders.Prefix2``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type
U
=
^
N1
.
T
^<^
"fo$o"
,^
""", // missing last param
...
...
@@ -1569,6 +1596,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"
DummyProviderForLanguageServiceTesting
.
dll
")])
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``LocationOfParams.TypeProviders.Prefix2Named1``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type
U
=
^
N1
.
T
^<^
"fo$o"
,^
ParamIgnored
=
""", // missing last param after name with equals
...
...
@@ -1576,6 +1604,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"
DummyProviderForLanguageServiceTesting
.
dll
")])
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``LocationOfParams.TypeProviders.Prefix2Named2``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type
U
=
^
N1
.
T
^<^
"fo$o"
,^
ParamIgnored
""", // missing last param after name sans equals
...
...
@@ -1777,6 +1806,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
this.VerifyParameterInfoContainedAtStartOfMarker(fileContents,"
(*Mark*)
",["
string
";"
System
.
Globalization
.
NumberStyles
"])
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``Multi.DotNet.StaticMethod.WithinLambda``() =
let fileContents = """
let
z
=
fun
x
->
x
+
System
.
Int16
.
Parse
(
""
,(*
Mark
*)
"""
this.VerifyParameterInfoContainedAtStartOfMarker(fileContents,"
(*Mark*)
",["
string
";"
System
.
Globalization
.
NumberStyles
"])
...
...
@@ -1795,6 +1825,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
(* Common functions for multi-parameterinfo tests -------------------------------------------------- *)
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``Multi.DotNet.Constructor``() =
let fileContents = "
let
_
=
new
System
.
DateTime
(
2010
,
12
,(*
Mark
*)
"
this.VerifyParameterInfoContainedAtStartOfMarker(fileContents,"
(*Mark*)
",["
int
";"
int
";"
int
"])
...
...
@@ -1890,6 +1921,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
this.VerifyParameterInfoAtStartOfMarker(fileContents,"
(*Mark*)
",[["
int
list
"]])
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``Multi.Function.WithOptionType``() =
let fileContents = """
let
foo
(
a
:
int
option
,
b
:
string
ref
)
=
0
...
...
@@ -1906,6 +1938,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
this.VerifyParameterInfoAtStartOfMarker(fileContents,"
(*Mark*)
",[["
int
option
";"
float
option
"]])
[<Test>]
[<Ignore("
https
://
github
.
com
/
Microsoft
/
visualfsharp
/
issues
/
6166
")>]
member public this.``Multi.Function.WithRefType``() =
let fileContents = """
let
foo
(
a
:
int
ref
,
b
:
string
ref
)
=
0
...
...
vsintegration/tests/UnitTests/Tests.Build.fs
浏览文件 @
fdbcd9c0
...
...
@@ -40,7 +40,7 @@ type MyLogger(f : string -> unit) =
type
FauxHostObject
()
=
let
mutable
myFlags
:
string
[]
=
null
let
mutable
mySources
:
string
[]
=
null
member
x
.
Compile
(
compile
:
System
.
Converter
<
int
,
int
>,
flags
:
string
[]
,
sources
:
string
[]
)
=
member
x
.
Compile
(
compile
:
System
.
Func
<
int
>,
flags
:
string
[]
,
sources
:
string
[]
)
=
myFlags
<-
flags
mySources
<-
sources
0
...
...
@@ -77,7 +77,7 @@ type Build() =
let
p
=
tool
.
InternalGenerateFullPathToTool
()
Assert
.
Fail
(
"should not succeed"
)
with
e
->
e
.
Message
.
AssertMatchesPattern
(
"ToolPath is unknown; specify the path to
fsc.exe as the ToolPath property
."
)
e
.
Message
.
AssertMatchesPattern
(
"ToolPath is unknown; specify the path to
the tool
."
)
[<
Test
>]
member
public
this
.
TestCodePage
()
=
...
...
@@ -92,7 +92,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -107,7 +108,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -122,7 +124,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -139,7 +142,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -154,7 +158,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -168,7 +173,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -183,7 +189,8 @@ type Build() =
"--warnaserror-:52,109"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -198,7 +205,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -213,7 +221,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -228,7 +237,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -243,7 +253,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -258,7 +269,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -272,7 +284,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -287,7 +300,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -302,6 +316,7 @@ type Build() =
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
+
"--yadda"
+
Environment
.
NewLine
+
"yadda"
+
Environment
.
NewLine
)
cmd
...
...
@@ -318,7 +333,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -333,7 +349,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -348,7 +365,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -363,7 +381,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -379,7 +398,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -395,7 +415,9 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
cmd
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
member
public
this
.
TestReferencePathWithSpaces
()
=
...
...
@@ -410,7 +432,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -425,7 +448,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -442,6 +466,7 @@ type Build() =
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
+
src
+
Environment
.
NewLine
+
src
+
Environment
.
NewLine
)
cmd
...
...
@@ -459,7 +484,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -474,7 +500,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -489,7 +516,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -503,7 +531,8 @@ type Build() =
"--utf8output"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -517,7 +546,8 @@ type Build() =
"--win32res:foo.res"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -531,7 +561,8 @@ type Build() =
"--win32manifest:foo.manifest"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -544,7 +575,8 @@ type Build() =
"--warnaserror:76"
+
Environment
.
NewLine
+
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--highentropyva+"
+
Environment
.
NewLine
)
"--highentropyva+"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -558,7 +590,8 @@ type Build() =
"--fullpaths"
+
Environment
.
NewLine
+
"--flaterrors"
+
Environment
.
NewLine
+
"--subsystemversion:6.02"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
)
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
)
cmd
[<
Test
>]
...
...
@@ -627,6 +660,7 @@ type Build() =
"--flaterrors"
+
Environment
.
NewLine
+
"--subsystemversion:4.0"
+
Environment
.
NewLine
+
"--highentropyva-"
+
Environment
.
NewLine
+
"--nocopyfsharpcore"
+
Environment
.
NewLine
+
"--yadda:yadda"
+
Environment
.
NewLine
+
"--other:internal quote"
+
Environment
.
NewLine
+
"blah"
+
Environment
.
NewLine
+
...
...
@@ -670,6 +704,7 @@ type Build() =
"--flaterrors"
"--subsystemversion:4.0"
"--highentropyva-"
"--nocopyfsharpcore"
"--yadda:yadda"
"--other:internal quote"
// note stripped internal quotes
"blah"
|]
...
...
vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
浏览文件 @
fdbcd9c0
...
...
@@ -12,6 +12,7 @@
<UsePackageTargetFallbackHack>
true
</UsePackageTargetFallbackHack>
<AutoGenerateBindingRedirects>
true
</AutoGenerateBindingRedirects>
<EnableDefaultEmbeddedResourceItems>
false
</EnableDefaultEmbeddedResourceItems>
<IsTestProject>
true
</IsTestProject>
</PropertyGroup>
<ItemGroup>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录