Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
80a23ee4
F
fsharp
项目概览
dotNET Platform
/
fsharp
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
80a23ee4
编写于
11月 14, 2022
作者:
K
Kevin Ransom (msft)
提交者:
GitHub
11月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug fsharpqa tests (#14298)
上级
e2f3a3e0
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
76 addition
and
88 deletion
+76
-88
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/debug.fs
...harp.Compiler.ComponentTests/CompilerOptions/fsc/debug.fs
+42
-0
tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
...iler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
+1
-0
tests/FSharp.Test.Utilities/Compiler.fs
tests/FSharp.Test.Utilities/Compiler.fs
+24
-0
tests/fsharpqa/Source/CompilerOptions/fsc/debug/debug01.fs
tests/fsharpqa/Source/CompilerOptions/fsc/debug/debug01.fs
+0
-37
tests/fsharpqa/Source/CompilerOptions/fsc/debug/debug02.fs
tests/fsharpqa/Source/CompilerOptions/fsc/debug/debug02.fs
+0
-37
tests/fsharpqa/Source/CompilerOptions/fsc/debug/env.lst
tests/fsharpqa/Source/CompilerOptions/fsc/debug/env.lst
+0
-2
tests/fsharpqa/Source/Conformance/DeclarationElements/ObjectConstructors/env.lst
...onformance/DeclarationElements/ObjectConstructors/env.lst
+1
-1
tests/fsharpqa/Source/test.lst
tests/fsharpqa/Source/test.lst
+8
-11
未找到文件。
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/debug.fs
0 → 100644
浏览文件 @
80a23ee4
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace
FSharp
.
Compiler
.
ComponentTests
.
CompilerOptions
open
Xunit
open
FSharp
.
Test
open
FSharp
.
Test
.
Compiler
module
debug
=
[<
Fact
>]
let
``fsc debug``
()
=
FSharp
"""
printfn "
Hello
,
World
"
"""
|>
asExe
|>
withOptions
[
"--debug"
]
|>
compile
|>
shouldSucceed
|>
verifyHasPdb
[<
Fact
>]
let
``fsc debug plus``
()
=
FSharp
"""
printfn "
Hello
,
World
"
"""
|>
asExe
|>
withOptions
[
"--debug+"
]
|>
compile
|>
shouldSucceed
|>
verifyHasPdb
[<
Fact
>]
let
``fsc debug minus``
()
=
FSharp
"""
printfn "
Hello
,
World
"
"""
|>
asExe
|>
withOptions
[
"--debug-"
]
|>
compile
|>
shouldSucceed
|>
verifyNoPdb
tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
浏览文件 @
80a23ee4
...
@@ -187,6 +187,7 @@
...
@@ -187,6 +187,7 @@
<Compile
Include=
"TypeChecks\ParallelCheckingWithSignatureFilesTests.fs"
/>
<Compile
Include=
"TypeChecks\ParallelCheckingWithSignatureFilesTests.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\checked\checked.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\checked\checked.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\cliversion.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\cliversion.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\debug.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\langversion.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\langversion.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\noframework\noframework.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\noframework\noframework.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\platform\platform.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\platform\platform.fs"
/>
...
...
tests/FSharp.Test.Utilities/Compiler.fs
浏览文件 @
80a23ee4
...
@@ -1072,6 +1072,30 @@ module rec Compiler =
...
@@ -1072,6 +1072,30 @@ module rec Compiler =
result
result
let
verifyHasPdb
(
result
:
CompilationResult
):
unit
=
let
verifyPdbExists
r
=
match
r
.
OutputPath
with
|
Some
assemblyPath
->
let
pdbPath
=
Path
.
ChangeExtension
(
assemblyPath
,
".pdb"
)
if
not
(
FileSystem
.
FileExistsShim
pdbPath
)
then
failwith
$
"PDB file does not exists: {pdbPath}"
|
_
->
failwith
"Output path is not set, please make sure compilation was successfull."
match
result
with
|
CompilationResult
.
Success
r
->
verifyPdbExists
r
|
_
->
failwith
"Result should be
\"
Success
\"
in order to verify PDB."
let
verifyNoPdb
(
result
:
CompilationResult
):
unit
=
let
verifyPdbNotExists
r
=
match
r
.
OutputPath
with
|
Some
assemblyPath
->
let
pdbPath
=
Path
.
ChangeExtension
(
assemblyPath
,
".pdb"
)
if
FileSystem
.
FileExistsShim
pdbPath
then
failwith
$
"PDB file exists: {pdbPath}"
|
_
->
failwith
"Output path is not set, please make sure compilation was successfull."
match
result
with
|
CompilationResult
.
Success
r
->
verifyPdbNotExists
r
|
_
->
failwith
"Result should be
\"
Success
\"
in order to verify PDB."
[<
AutoOpen
>]
[<
AutoOpen
>]
module
Assertions
=
module
Assertions
=
let
private
getErrorNumber
(
error
:
ErrorType
)
:
int
=
let
private
getErrorNumber
(
error
:
ErrorType
)
:
int
=
...
...
tests/fsharpqa/Source/CompilerOptions/fsc/debug/debug01.fs
已删除
100644 → 0
浏览文件 @
e2f3a3e0
// #Regression #NoMT #CompilerOptions #NoMono
// Regression test for FSHARP1.0:5080
// Verify that the assembly contains the full path to the .pdb file (we are compiling with --debug+)
//<Expects status="success"></Expects>
/// Search a sequence of char (the string 's') in a binary file (the 'assemblyFullPath')
let
f
(
assemblyFullPath
:
string
,
s
:
string
)
=
printfn
"Searching '%s' in '%s'"
s
assemblyFullPath
/// Make an array out of the string (will be used later to compare fragments of the file)
let
expectedStringAsArray
=
seq
{
for
i
in
s
->
int
i
}
|>
Seq
.
toArray
/// Open binary file
use
assemblyStream
=
new
System
.
IO
.
StreamReader
(
assemblyFullPath
)
/// Makes sliding windows out of the sequence of bytes that make up the binary file
let
z
=
seq
{
while
not
assemblyStream
.
EndOfStream
do
yield
assemblyStream
.
Read
()
}
|>
Seq
.
windowed
expectedStringAsArray
.
Length
/// Try to find a matching sequence
let
p
=
z
|>
Seq
.
tryFindIndex
(
fun
t
->
(
Seq
.
toArray
t
)
=
expectedStringAsArray
)
/// Dump the result
p
.
IsSome
/// Fully qualified path to ourselves
let
assemblyFullPath
=
System
.
Reflection
.
Assembly
.
GetExecutingAssembly
()
.
Location
/// Fully qualified path to pdb - we expect this info to be in the binary!
let
pdbFullPath
=
System
.
IO
.
Path
.
ChangeExtension
(
assemblyFullPath
,
"pdb"
)
if
f
(
assemblyFullPath
,
pdbFullPath
)
then
printfn
"OK: .pdb file found in assembly"
exit
0
else
printfn
"ERROR: No .pdb file found in assembly"
exit
1
tests/fsharpqa/Source/CompilerOptions/fsc/debug/debug02.fs
已删除
100644 → 0
浏览文件 @
e2f3a3e0
// #Regression #NoMT #CompilerOptions
// Regression test for FSHARP1.0:5080
// Verify that the assembly DOES NOT contain the full path to the .pdb file (we are compiling with --debug-)
//<Expects status="success"></Expects>
/// Search a sequence of char (the string 's') in a binary file (the 'assemblyFullPath')
let
f
(
assemblyFullPath
:
string
,
s
:
string
)
=
printfn
"Searching '%s' in '%s'"
s
assemblyFullPath
/// Make an array out of the string (will be used later to compare fragments of the file)
let
expectedStringAsArray
=
seq
{
for
i
in
s
->
int
i
}
|>
Seq
.
toArray
/// Open binary file
use
assemblyStream
=
new
System
.
IO
.
StreamReader
(
assemblyFullPath
)
/// Makes sliding windows out of the sequence of bytes that make up the binary file
let
z
=
seq
{
while
not
assemblyStream
.
EndOfStream
do
yield
assemblyStream
.
Read
()
}
|>
Seq
.
windowed
expectedStringAsArray
.
Length
/// Try to find a matching sequence
let
p
=
z
|>
Seq
.
tryFindIndex
(
fun
t
->
(
Seq
.
toArray
t
)
=
expectedStringAsArray
)
/// Dump the result
p
.
IsSome
/// Fully qualified path to ourselves
let
assemblyFullPath
=
System
.
Reflection
.
Assembly
.
GetExecutingAssembly
()
.
Location
/// Fully qualified path to pdb - we expect this info to be in the binary!
let
pdbFullPath
=
System
.
IO
.
Path
.
ChangeExtension
(
assemblyFullPath
,
"pdb"
)
if
f
(
assemblyFullPath
,
pdbFullPath
)
then
printfn
"ERROR: .pdb file found in assembly"
exit
1
else
printfn
"OK: No .pdb file found in assembly"
exit
0
tests/fsharpqa/Source/CompilerOptions/fsc/debug/env.lst
已删除
100644 → 0
浏览文件 @
e2f3a3e0
NOMONO SOURCE=debug01.fs SCFLAGS="--debug+" # debug01.fs (--debug+)
SOURCE=debug02.fs SCFLAGS="--debug-" # debug02.fs (--debug-)
tests/fsharpqa/Source/Conformance/DeclarationElements/ObjectConstructors/env.lst
浏览文件 @
80a23ee4
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
SOURCE=E_NoLetBindingsWOObjCtor.fs # E_NoLetBindingsWOObjCtor.fs
SOURCE=E_NoLetBindingsWOObjCtor.fs # E_NoLetBindingsWOObjCtor.fs
SOURCE=E_NoObjectConstructorOnInterfaces.fs # E_NoObjectConstructorOnInterfaces.fs
SOURCE=E_NoObjectConstructorOnInterfaces.fs # E_NoObjectConstructorOnInterfaces.fs
SOURCE=AlternateGenericTypeSyntax01.fs # AlternateGenericTypeSyntax01.fs
SOURCE=AlternateGenericTypeSyntax01.fs
SCFLAGS="--langversion:5.0"
# AlternateGenericTypeSyntax01.fs
SOURCE=MutuallyRecursive01.fs # MutuallyRecursive01.fs
SOURCE=MutuallyRecursive01.fs # MutuallyRecursive01.fs
SOURCE=ImplicitCtorsCallingBaseclassPassingSelf.fs # ImplicitCtorsCallingBaseclassPassingSelf.fs
SOURCE=ImplicitCtorsCallingBaseclassPassingSelf.fs # ImplicitCtorsCallingBaseclassPassingSelf.fs
...
...
tests/fsharpqa/Source/test.lst
浏览文件 @
80a23ee4
...
@@ -5,15 +5,13 @@
...
@@ -5,15 +5,13 @@
# ReqNOCov -- skip this test/suite if we are doing a code coverage run
# ReqNOCov -- skip this test/suite if we are doing a code coverage run
# ReqENU -- skip this test/suite if we are running on non-ENU (useful to exclude hard-to-localize tests)
# ReqENU -- skip this test/suite if we are running on non-ENU (useful to exclude hard-to-localize tests)
CompilerOptions01,NoMT CompilerOptions\fsc\checked
CompilerOptions01,NoMT CompilerOptions\fsc\cliversion
CompilerOptions01,NoMT CompilerOptions\fsc\codepage
CompilerOptions01,NoMT CompilerOptions\fsc\codepage
CompilerOptions01,NoMT CompilerOptions\fsc\crossoptimize
CompilerOptions01,NoMT CompilerOptions\fsc\crossoptimize
CompilerOptions01,NoMT
CompilerOptions\fsc\debug
CompilerOptions01,NoMT
,Determinism CompilerOptions\fsc\determinism
CompilerOptions01,NoMT CompilerOptions\fsc\dumpAllCommandLineOptions
CompilerOptions01,NoMT CompilerOptions\fsc\dumpAllCommandLineOptions
CompilerOptions01,NoMT CompilerOptions\fsc\flaterrors
CompilerOptions01,NoMT CompilerOptions\fsc\flaterrors
CompilerOptions02,NoMT CompilerOptions\fsc\gccerrors
CompilerOptions02,NoMT CompilerOptions\fsc\gccerrors
CompilerOptions01,NoMT,help
CompilerOptions\fsc\help
CompilerOptions01,NoMT,help CompilerOptions\fsc\help
CompilerOptions01,NoMT CompilerOptions\fsc\highentropyva
CompilerOptions01,NoMT CompilerOptions\fsc\highentropyva
CompilerOptions01,NoMT CompilerOptions\fsc\langversion
CompilerOptions01,NoMT CompilerOptions\fsc\langversion
CompilerOptions01,NoMT CompilerOptions\fsc\lib
CompilerOptions01,NoMT CompilerOptions\fsc\lib
...
@@ -21,23 +19,22 @@ CompilerOptions01,NoMT CompilerOptions\fsc\noframework
...
@@ -21,23 +19,22 @@ CompilerOptions01,NoMT CompilerOptions\fsc\noframework
CompilerOptions01,NoMT CompilerOptions\fsc\nologo
CompilerOptions01,NoMT CompilerOptions\fsc\nologo
CompilerOptions01,NoMT CompilerOptions\fsc\optimize
CompilerOptions01,NoMT CompilerOptions\fsc\optimize
CompilerOptions01,NoMT CompilerOptions\fsc\out
CompilerOptions01,NoMT CompilerOptions\fsc\out
CompilerOptions01,NoMT,pdbs CompilerOptions\fsc\pdb
CompilerOptions01,NoMT CompilerOptions\fsc\platform
CompilerOptions01,NoMT CompilerOptions\fsc\platform
CompilerOptions01,NoMT,pdbs CompilerOptions\fsc\pdb
CompilerOptions01,NoMT CompilerOptions\fsc\Removed
CompilerOptions01,NoMT CompilerOptions\fsc\Removed
CompilerOptions01,NoMT CompilerOptions\fsc\responsefile
CompilerOptions01,NoMT CompilerOptions\fsc\standalone
CompilerOptions01,NoMT CompilerOptions\fsc\standalone
CompilerOptions01,NoMT,NoHostedCompiler
CompilerOptions\fsc\staticlink
CompilerOptions01,NoMT,NoHostedCompiler
CompilerOptions\fsc\staticlink
CompilerOptions01,NoMT CompilerOptions\fsc\subsystemversion
CompilerOptions01,NoMT CompilerOptions\fsc\subsystemversion
CompilerOptions01,NoMT CompilerOptions\fsc\tailcalls
CompilerOptions01,NoMT CompilerOptions\fsc\tailcalls
CompilerOptions01,NoMT CompilerOptions\fsc\target
CompilerOptions01,NoMT CompilerOptions\fsc\target
CompilerOptions01,NoMT,NoHostedCompiler
CompilerOptions\fsc\tokenize
CompilerOptions01,NoMT,NoHostedCompiler
CompilerOptions\fsc\tokenize
CompilerOptions01,NoMT CompilerOptions\fsc\responsefile
CompilerOptions01,NoMT,help
CompilerOptions\fsi\help
CompilerOptions01,NoMT,help CompilerOptions\fsi\help
CompilerOptions01,NoMT CompilerOptions\fsi\highentropyva
CompilerOptions01,NoMT CompilerOptions\fsi\highentropyva
CompilerOptions01,NoMT CompilerOptions\fsi\langversion
CompilerOptions01,NoMT CompilerOptions\fsi\langversion
CompilerOptions01,NoMT CompilerOptions\fsi\nologo
CompilerOptions01,NoMT CompilerOptions\fsi\nologo
CompilerOptions01,NoMT CompilerOptions\fsi\subsystemversion
CompilerOptions01,NoMT CompilerOptions\fsi\subsystemversion
CompilerOptions02,NoMT CompilerOptions\fsi\exename
CompilerOptions01,NoMT,Determinism CompilerOptions\fsc\determinism
Conformance01 Conformance\BasicGrammarElements\Constants
Conformance01 Conformance\BasicGrammarElements\Constants
Conformance01 Conformance\BasicGrammarElements\OperatorNames
Conformance01 Conformance\BasicGrammarElements\OperatorNames
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录