Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
42fe0347
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
42fe0347
编写于
12月 13, 2016
作者:
T
Tomas Matousek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix or skip tests to work on Unix
上级
05d35745
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
22 addition
and
20 deletion
+22
-20
src/Scripting/CSharpTest/CommandLineRunnerTests.cs
src/Scripting/CSharpTest/CommandLineRunnerTests.cs
+7
-7
src/Scripting/CSharpTest/InteractiveSessionTests.cs
src/Scripting/CSharpTest/InteractiveSessionTests.cs
+2
-2
src/Scripting/CSharpTest/ObjectFormatterTests.cs
src/Scripting/CSharpTest/ObjectFormatterTests.cs
+7
-7
src/Scripting/Core/Hosting/Resolvers/RuntimeMetadataReferenceResolver.cs
...ore/Hosting/Resolvers/RuntimeMetadataReferenceResolver.cs
+1
-1
src/Scripting/CoreTestUtilities/ObjectFormatterTestBase.cs
src/Scripting/CoreTestUtilities/ObjectFormatterTestBase.cs
+2
-2
src/Test/Utilities/Shared/Compilation/CompilationExtensions.cs
...est/Utilities/Shared/Compilation/CompilationExtensions.cs
+3
-1
未找到文件。
src/Scripting/CSharpTest/CommandLineRunnerTests.cs
浏览文件 @
42fe0347
...
...
@@ -326,7 +326,7 @@ public void Args_Interactive2()
AssertEx
.
AssertEqualToleratingWhitespaceDifferences
(
error
,
runner
.
Console
.
Error
.
ToString
());
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
Args_InteractiveWithScript1
()
{
var
script
=
Temp
.
CreateFile
(
extension
:
".csx"
).
WriteAllText
(
"foreach (var arg in Args) Print(arg);"
);
...
...
@@ -359,7 +359,7 @@ > 1
> "
,
runner
.
Console
.
Out
.
ToString
());
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
Args_Script1
()
{
var
script
=
Temp
.
CreateFile
(
extension
:
".csx"
).
WriteAllText
(
"foreach (var arg in Args) Print(arg);"
);
...
...
@@ -367,7 +367,7 @@ public void Args_Script1()
var
runner
=
CreateRunner
(
args
:
new
[]
{
script
.
Path
,
"arg1"
,
"arg2"
,
"arg3"
});
Assert
.
Equal
(
0
,
runner
.
RunInteractive
());
Assert
.
True
(
runner
.
RunInteractive
()
==
0
,
userMessage
:
runner
.
Console
.
Error
.
ToString
());
AssertEx
.
AssertEqualToleratingWhitespaceDifferences
(
$@"
""arg1""
...
...
@@ -376,7 +376,7 @@ public void Args_Script1()
"
,
runner
.
Console
.
Out
.
ToString
());
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
Args_Script2
()
{
var
script
=
Temp
.
CreateFile
(
extension
:
".csx"
).
WriteAllText
(
"foreach (var arg in Args) Print(arg);"
);
...
...
@@ -384,7 +384,7 @@ public void Args_Script2()
var
runner
=
CreateRunner
(
args
:
new
[]
{
script
.
Path
,
"@arg1"
,
"@arg2"
,
"@arg3"
});
Assert
.
Equal
(
0
,
runner
.
RunInteractive
());
Assert
.
True
(
runner
.
RunInteractive
()
==
0
,
userMessage
:
runner
.
Console
.
Error
.
ToString
());
AssertEx
.
AssertEqualToleratingWhitespaceDifferences
(
$@"
""@arg1""
...
...
@@ -393,7 +393,7 @@ public void Args_Script2()
"
,
runner
.
Console
.
Out
.
ToString
());
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
Args_Script3
()
{
var
script
=
Temp
.
CreateFile
(
extension
:
".csx"
).
WriteAllText
(
"foreach (var arg in Args) Print(arg);"
);
...
...
@@ -412,7 +412,7 @@ public void Args_Script3()
args
:
new
[]
{
$"@
{
rsp
.
Path
}
"
,
"/arg5"
,
"--"
,
"/arg7"
},
input
:
"foreach (var arg in Args) Print(arg);"
);
Assert
.
Equal
(
0
,
runner
.
RunInteractive
());
Assert
.
True
(
runner
.
RunInteractive
()
==
0
,
userMessage
:
runner
.
Console
.
Error
.
ToString
());
AssertEx
.
AssertEqualToleratingWhitespaceDifferences
(
$@"
""--""
...
...
src/Scripting/CSharpTest/InteractiveSessionTests.cs
浏览文件 @
42fe0347
...
...
@@ -1167,13 +1167,13 @@ public void ReferenceDirective_RelativeToBaseParent()
string
scriptPath
=
Path
.
Combine
(
dir
,
"a.csx"
);
var
script
=
CSharpScript
.
Create
(
$@"#r ""
..\
{
libFileName
}
"""
,
$@"#r ""
{
Path
.
Combine
(
".."
,
libFileName
)
}
"""
,
ScriptOptions
.
Default
.
WithFilePath
(
scriptPath
));
script
.
GetCompilation
().
VerifyDiagnostics
();
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
ReferenceDirective_RelativeToBaseRoot
()
{
var
file
=
Temp
.
CreateFile
();
...
...
src/Scripting/CSharpTest/ObjectFormatterTests.cs
浏览文件 @
42fe0347
...
...
@@ -342,7 +342,7 @@ public void LongMembers()
Assert
.
Equal
(
"LongMembers { LongNa..."
,
str
);
str
=
new
TestCSharpObjectFormatter
(
maximumLineLength
:
20
).
FormatObject
(
obj
,
SeparateLinesOptions
);
Assert
.
Equal
(
"LongMembers {\r\n LongName0123456789...\r\n LongValue: \"012345...\r\n}\r\n
"
,
str
);
Assert
.
Equal
(
$"LongMembers
{{{
Environment
.
NewLine
}
LongName0123456789
...{
Environment
.
NewLine
}
LongValue
:
\
"012345...{Environment.NewLine}}}{Environment.NewLine}
"
,
str
);
}
[
Fact
]
...
...
@@ -834,7 +834,7 @@ public static void Method<U>()
}
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
StackTrace_NonGeneric
()
{
try
...
...
@@ -855,7 +855,7 @@ public void StackTrace_NonGeneric()
}
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
StackTrace_GenericMethod
()
{
try
...
...
@@ -877,7 +877,7 @@ public void StackTrace_GenericMethod()
}
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
StackTrace_GenericType
()
{
try
...
...
@@ -899,7 +899,7 @@ public void StackTrace_GenericType()
}
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
StackTrace_GenericMethodInGenericType
()
{
try
...
...
@@ -968,7 +968,7 @@ public static void Method<U>(ref U u)
}
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
StackTrace_RefOutParameters
()
{
try
...
...
@@ -991,7 +991,7 @@ public void StackTrace_RefOutParameters()
}
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
)),
WorkItem
(
15860
,
"https://github.com/dotnet/roslyn/issues/15860"
)
]
public
void
StackTrace_GenericRefParameter
()
{
try
...
...
src/Scripting/Core/Hosting/Resolvers/RuntimeMetadataReferenceResolver.cs
浏览文件 @
42fe0347
...
...
@@ -181,7 +181,7 @@ private PortableExecutableReference ResolveTrustedPlatformAssemblyCore(string na
{
var
set
=
ImmutableDictionary
.
CreateBuilder
<
string
,
string
>(
StringComparer
.
OrdinalIgnoreCase
);
if
(
CoreClrShim
.
AppContext
.
GetData
(
"TRUSTED_PLATFORM_ASSEMBLIES"
)
is
string
paths
)
if
(
CoreClrShim
.
AppContext
.
GetData
?.
Invoke
(
"TRUSTED_PLATFORM_ASSEMBLIES"
)
is
string
paths
)
{
foreach
(
var
path
in
paths
.
Split
(
Path
.
PathSeparator
))
{
...
...
src/Scripting/CoreTestUtilities/ObjectFormatterTestBase.cs
浏览文件 @
42fe0347
...
...
@@ -15,7 +15,7 @@ public abstract class ObjectFormatterTestBase
public
void
AssertMembers
(
string
str
,
params
string
[]
expected
)
{
int
i
=
0
;
foreach
(
var
line
in
str
.
Split
(
new
[]
{
"\r\n
"
},
StringSplitOptions
.
None
))
foreach
(
var
line
in
str
.
Split
(
new
[]
{
Environment
.
NewLine
+
"
"
},
StringSplitOptions
.
None
))
{
if
(
i
==
0
)
{
...
...
@@ -23,7 +23,7 @@ public void AssertMembers(string str, params string[] expected)
}
else
if
(
i
==
expected
.
Length
-
1
)
{
Assert
.
Equal
(
expected
[
i
]
+
"\r\n}\r\n"
,
line
);
Assert
.
Equal
(
expected
[
i
]
+
Environment
.
NewLine
+
"}"
+
Environment
.
NewLine
,
line
);
}
else
{
...
...
src/Test/Utilities/Shared/Compilation/CompilationExtensions.cs
浏览文件 @
42fe0347
...
...
@@ -11,7 +11,9 @@
using
Microsoft.CodeAnalysis.CodeGen
;
using
Microsoft.CodeAnalysis.Emit
;
using
Microsoft.CodeAnalysis.Test.Extensions
;
using
Roslyn.Test.PdbUtilities
;
using
Roslyn.Test.Utilities
;
using
Roslyn.Utilities
;
using
Xunit
;
using
Xunit.Sdk
;
...
...
@@ -33,7 +35,7 @@ public static class CompilationExtensions
if
(
pdbStream
==
null
&&
compilation
.
Options
.
OptimizationLevel
==
OptimizationLevel
.
Debug
&&
options
?.
DebugInformationFormat
!=
DebugInformationFormat
.
Embedded
)
{
if
(
MonoHelpers
.
IsRunningOnMono
())
if
(
MonoHelpers
.
IsRunningOnMono
()
||
PathUtilities
.
IsUnixLikePlatform
)
{
options
=
(
options
??
EmitOptions
.
Default
).
WithDebugInformationFormat
(
DebugInformationFormat
.
PortablePdb
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录