Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
093ea477
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,发现更多精彩内容 >>
未验证
提交
093ea477
编写于
7月 29, 2020
作者:
J
Jared Parsons
提交者:
GitHub
7月 29, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #46383 from jaredpar/test-net50
Move unit tests to net5.0
上级
bd49f957
d0a8d58b
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
52 addition
and
34 deletion
+52
-34
eng/build.ps1
eng/build.ps1
+2
-1
eng/build.sh
eng/build.sh
+1
-1
eng/targets/Settings.props
eng/targets/Settings.props
+1
-1
src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
+2
-2
src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
...icrosoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
+1
-1
src/Compilers/CSharp/Test/Emit/Microsoft.CodeAnalysis.CSharp.Emit.UnitTests.csproj
.../Emit/Microsoft.CodeAnalysis.CSharp.Emit.UnitTests.csproj
+1
-1
src/Compilers/CSharp/Test/IOperation/Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests.csproj
...Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests.csproj
+1
-1
src/Compilers/CSharp/Test/Semantic/Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests.csproj
...c/Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests.csproj
+1
-1
src/Compilers/CSharp/Test/Semantic/Semantics/NativeIntegerTests.cs
...lers/CSharp/Test/Semantic/Semantics/NativeIntegerTests.cs
+1
-0
src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs
src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs
+1
-0
src/Compilers/CSharp/Test/Semantic/Semantics/PatternMatchingTestBase.cs
...CSharp/Test/Semantic/Semantics/PatternMatchingTestBase.cs
+1
-0
src/Compilers/CSharp/Test/Symbol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj
...bol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj
+1
-1
src/Compilers/CSharp/Test/Syntax/Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests.csproj
...tax/Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests.csproj
+1
-1
src/Compilers/Core/CodeAnalysisTest/Microsoft.CodeAnalysis.UnitTests.csproj
.../CodeAnalysisTest/Microsoft.CodeAnalysis.UnitTests.csproj
+1
-1
src/Compilers/Core/MSBuildTaskTests/MapSourceRootTests.cs
src/Compilers/Core/MSBuildTaskTests/MapSourceRootTests.cs
+2
-0
src/Compilers/Core/MSBuildTaskTests/Microsoft.Build.Tasks.CodeAnalysis.UnitTests.csproj
...Tests/Microsoft.Build.Tasks.CodeAnalysis.UnitTests.csproj
+1
-1
src/Compilers/Core/MSBuildTaskTests/TargetTests.cs
src/Compilers/Core/MSBuildTaskTests/TargetTests.cs
+11
-10
src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj
...rs/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj
+3
-3
src/Compilers/VisualBasic/Test/Emit/Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests.vbproj
.../Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests.vbproj
+1
-1
src/Compilers/VisualBasic/Test/IOperation/Roslyn.Compilers.VisualBasic.IOperation.UnitTests.vbproj
.../Roslyn.Compilers.VisualBasic.IOperation.UnitTests.vbproj
+1
-1
src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj
...rosoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj
+2
-2
src/Compilers/VisualBasic/Test/Symbol/Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests.vbproj
...icrosoft.CodeAnalysis.VisualBasic.Symbol.UnitTests.vbproj
+1
-1
src/Compilers/VisualBasic/Test/Symbol/SymbolsTests/InstantiatingGenerics.vb
...alBasic/Test/Symbol/SymbolsTests/InstantiatingGenerics.vb
+1
-1
src/Compilers/VisualBasic/Test/Syntax/Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests.vbproj
...icrosoft.CodeAnalysis.VisualBasic.Syntax.UnitTests.vbproj
+1
-1
src/Test/Utilities/Portable/Assert/AssertEx.cs
src/Test/Utilities/Portable/Assert/AssertEx.cs
+11
-0
src/Workspaces/CoreTestUtilities/Roslyn.Services.UnitTests.Utilities.csproj
...eTestUtilities/Roslyn.Services.UnitTests.Utilities.csproj
+1
-1
未找到文件。
eng/build.ps1
浏览文件 @
093ea477
...
@@ -212,7 +212,7 @@ function BuildSolution() {
...
@@ -212,7 +212,7 @@ function BuildSolution() {
$projects
=
Join-Path
$RepoRoot
$solution
$projects
=
Join-Path
$RepoRoot
$solution
$toolsetBuildProj
=
InitializeToolset
$toolsetBuildProj
=
InitializeToolset
$testTargetFrameworks
=
if
(
$testCoreClr
)
{
"netcoreapp3.1"
}
else
{
""
}
$testTargetFrameworks
=
if
(
$testCoreClr
)
{
'net5.0%3Bnetcoreapp3.1'
}
else
{
""
}
$ibcDropName
=
GetIbcDropName
$ibcDropName
=
GetIbcDropName
...
@@ -406,6 +406,7 @@ function TestUsingOptimizedRunner() {
...
@@ -406,6 +406,7 @@ function TestUsingOptimizedRunner() {
# Exclude out the multi-targetted netcore app projects
# Exclude out the multi-targetted netcore app projects
$dlls
=
$dlls
|
?
{
-not
(
$_
.
FullName
-match
".*netcoreapp.*"
)
}
$dlls
=
$dlls
|
?
{
-not
(
$_
.
FullName
-match
".*netcoreapp.*"
)
}
$dlls
=
$dlls
|
?
{
-not
(
$_
.
FullName
-match
".*net5.0.*"
)
}
# Exclude out the ref assemblies
# Exclude out the ref assemblies
$dlls
=
$dlls
|
?
{
-not
(
$_
.
FullName
-match
".*\\ref\\.*"
)
}
$dlls
=
$dlls
|
?
{
-not
(
$_
.
FullName
-match
".*\\ref\\.*"
)
}
...
...
eng/build.sh
浏览文件 @
093ea477
...
@@ -266,7 +266,7 @@ function BuildSolution {
...
@@ -266,7 +266,7 @@ function BuildSolution {
test_runtime_args
=
"--debug"
test_runtime_args
=
"--debug"
elif
[[
"
$test_core_clr
"
==
true
]]
;
then
elif
[[
"
$test_core_clr
"
==
true
]]
;
then
test
=
true
test
=
true
test_runtime
=
"/p:TestRuntime=Core /p:TestTargetFrameworks=netcoreapp3.1"
test_runtime
=
"/p:TestRuntime=Core /p:TestTargetFrameworks=net
5.0%3Bnet
coreapp3.1"
mono_tool
=
""
mono_tool
=
""
fi
fi
...
...
eng/targets/Settings.props
浏览文件 @
093ea477
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
These may be overridden by projects that need to be skipped.
These may be overridden by projects that need to be skipped.
-->
-->
<TestTargetFrameworks
Condition=
"'$(TestRuntime)' == 'Mono'"
>
net46;net472
</TestTargetFrameworks>
<TestTargetFrameworks
Condition=
"'$(TestRuntime)' == 'Mono'"
>
net46;net472
</TestTargetFrameworks>
<TestTargetFrameworks
Condition=
"'$(TestRuntime)' == 'Core'"
>
netcoreapp3.1
</TestTargetFrameworks>
<TestTargetFrameworks
Condition=
"'$(TestRuntime)' == 'Core'"
>
netcoreapp3.1
;net5.0
</TestTargetFrameworks>
<XUnitDesktopSettingsFile>
$(MSBuildThisFileDirectory)..\config\xunit.runner.json
</XUnitDesktopSettingsFile>
<XUnitDesktopSettingsFile>
$(MSBuildThisFileDirectory)..\config\xunit.runner.json
</XUnitDesktopSettingsFile>
<XUnitCoreSettingsFile>
$(MSBuildThisFileDirectory)..\config\xunit.runner.json
</XUnitCoreSettingsFile>
<XUnitCoreSettingsFile>
$(MSBuildThisFileDirectory)..\config\xunit.runner.json
</XUnitCoreSettingsFile>
...
...
src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
浏览文件 @
093ea477
...
@@ -40,7 +40,7 @@ namespace Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests
...
@@ -40,7 +40,7 @@ namespace Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests
{
{
public class CommandLineTests : CommandLineTestBase
public class CommandLineTests : CommandLineTestBase
{
{
#if NETCOREAPP
3_1
#if NETCOREAPP
private static readonly string s_CSharpCompilerExecutable;
private static readonly string s_CSharpCompilerExecutable;
private static readonly string s_DotnetCscRun;
private static readonly string s_DotnetCscRun;
#else
#else
...
@@ -55,7 +55,7 @@ public class CommandLineTests : CommandLineTestBase
...
@@ -55,7 +55,7 @@ public class CommandLineTests : CommandLineTestBase
static CommandLineTests()
static CommandLineTests()
{
{
#if NETCOREAPP
3_1
#if NETCOREAPP
var cscDllPath = Path.Combine(
var cscDllPath = Path.Combine(
Path.GetDirectoryName(typeof(CommandLineTests).GetTypeInfo().Assembly.Location),
Path.GetDirectoryName(typeof(CommandLineTests).GetTypeInfo().Assembly.Location),
Path.Combine("dependency", "csc.dll"));
Path.Combine("dependency", "csc.dll"));
...
...
src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests
</RootNamespace>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<GenerateMicrosoftCodeAnalysisCommitHashAttribute>
true
</GenerateMicrosoftCodeAnalysisCommitHashAttribute>
<GenerateMicrosoftCodeAnalysisCommitHashAttribute>
true
</GenerateMicrosoftCodeAnalysisCommitHashAttribute>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
src/Compilers/CSharp/Test/Emit/Microsoft.CodeAnalysis.CSharp.Emit.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.UnitTests
</RootNamespace>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
</PropertyGroup>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ItemGroup
Label=
"Project References"
>
...
...
src/Compilers/CSharp/Test/IOperation/Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests
</RootNamespace>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
</PropertyGroup>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ItemGroup
Label=
"Project References"
>
<ProjectReference
Include=
"..\..\..\..\Test\Utilities\Portable\Roslyn.Test.Utilities.csproj"
/>
<ProjectReference
Include=
"..\..\..\..\Test\Utilities\Portable\Roslyn.Test.Utilities.csproj"
/>
...
...
src/Compilers/CSharp/Test/Semantic/Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests
</RootNamespace>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
</PropertyGroup>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ItemGroup
Label=
"Project References"
>
<ProjectReference
Include=
"..\..\..\..\Test\Utilities\Portable\Roslyn.Test.Utilities.csproj"
/>
<ProjectReference
Include=
"..\..\..\..\Test\Utilities\Portable\Roslyn.Test.Utilities.csproj"
/>
...
...
src/Compilers/CSharp/Test/Semantic/Semantics/NativeIntegerTests.cs
浏览文件 @
093ea477
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
using Roslyn.Test.Utilities;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Roslyn.Utilities;
using Xunit;
using Xunit;
using ReferenceEqualityComparer = Roslyn.Utilities.ReferenceEqualityComparer;
namespace Microsoft.CodeAnalysis.CSharp.UnitTests.Semantics
namespace Microsoft.CodeAnalysis.CSharp.UnitTests.Semantics
{
{
...
...
src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs
浏览文件 @
093ea477
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
using Roslyn.Utilities;
using Roslyn.Utilities;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Diagnostics;
using static Roslyn.Test.Utilities.TestMetadata;
using static Roslyn.Test.Utilities.TestMetadata;
using ReferenceEqualityComparer = Roslyn.Utilities.ReferenceEqualityComparer;
namespace Microsoft.CodeAnalysis.CSharp.UnitTests
namespace Microsoft.CodeAnalysis.CSharp.UnitTests
{
{
src/Compilers/CSharp/Test/Semantic/Semantics/PatternMatchingTestBase.cs
浏览文件 @
093ea477
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
using
Roslyn.Test.Utilities
;
using
Roslyn.Test.Utilities
;
using
Xunit
;
using
Xunit
;
using
Roslyn.Utilities
;
using
Roslyn.Utilities
;
using
ReferenceEqualityComparer
=
Roslyn
.
Utilities
.
ReferenceEqualityComparer
;
namespace
Microsoft.CodeAnalysis.CSharp.UnitTests
namespace
Microsoft.CodeAnalysis.CSharp.UnitTests
{
{
...
...
src/Compilers/CSharp/Test/Symbol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests
</RootNamespace>
<NoStdLib>
true
</NoStdLib>
<NoStdLib>
true
</NoStdLib>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
</PropertyGroup>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ItemGroup
Label=
"Project References"
>
...
...
src/Compilers/CSharp/Test/Syntax/Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<AllowUnsafeBlocks>
false
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
false
</AllowUnsafeBlocks>
<NoStdLib>
true
</NoStdLib>
<NoStdLib>
true
</NoStdLib>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<!-- The RESX resources generator produces invalid comments when the string has a line starting with '/' -->
<!-- The RESX resources generator produces invalid comments when the string has a line starting with '/' -->
<NoWarn>
$(NoWarn);1570;1587
</NoWarn>
<NoWarn>
$(NoWarn);1570;1587
</NoWarn>
</PropertyGroup>
</PropertyGroup>
...
...
src/Compilers/Core/CodeAnalysisTest/Microsoft.CodeAnalysis.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.UnitTests
</RootNamespace>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
</PropertyGroup>
</PropertyGroup>
<ItemGroup
Label=
"Linked Files"
>
<ItemGroup
Label=
"Linked Files"
>
<Compile
Include=
"..\..\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs"
>
<Compile
Include=
"..\..\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs"
>
...
...
src/Compilers/Core/MSBuildTaskTests/MapSourceRootTests.cs
浏览文件 @
093ea477
...
@@ -342,6 +342,7 @@ public void MetadataMerge1(bool deterministic)
...
@@ -342,6 +342,7 @@ public void MetadataMerge1(bool deterministic)
"MapSourceRoots.ContainsDuplicate"
,
"SourceRoot"
,
path1
,
"SourceLinkUrl"
,
"URL1"
,
"URL2"
))
+
Environment
.
NewLine
,
"MapSourceRoots.ContainsDuplicate"
,
"SourceRoot"
,
path1
,
"SourceLinkUrl"
,
"URL1"
,
"URL2"
))
+
Environment
.
NewLine
,
engine
.
Log
);
engine
.
Log
);
AssertEx
.
NotNull
(
task
.
MappedSourceRoots
);
AssertEx
.
Equal
(
new
[]
AssertEx
.
Equal
(
new
[]
{
{
$"'
{
path1
}
' SourceControl='git' RevisionId='RevId1' NestedRoot='NR1A' ContainingRoot='
{
path3
}
' MappedPath='
{(
deterministic
?
"/_/NR1A/"
:
path1
)}
' SourceLinkUrl='URL1'"
,
$"'
{
path1
}
' SourceControl='git' RevisionId='RevId1' NestedRoot='NR1A' ContainingRoot='
{
path3
}
' MappedPath='
{(
deterministic
?
"/_/NR1A/"
:
path1
)}
' SourceLinkUrl='URL1'"
,
...
@@ -446,6 +447,7 @@ public void Error_NoTopLevelSourceRoot(bool deterministic)
...
@@ -446,6 +447,7 @@ public void Error_NoTopLevelSourceRoot(bool deterministic)
}
}
else
else
{
{
AssertEx
.
NotNull
(
task
.
MappedSourceRoots
);
AssertEx
.
Equal
(
new
[]
AssertEx
.
Equal
(
new
[]
{
{
$"'
{
path1
}
' SourceControl='' RevisionId='' NestedRoot='a/b' ContainingRoot='
{
path1
}
' MappedPath='
{
path1
}
' SourceLinkUrl=''"
,
$"'
{
path1
}
' SourceControl='' RevisionId='' NestedRoot='a/b' ContainingRoot='
{
path1
}
' MappedPath='
{
path1
}
' SourceLinkUrl=''"
,
...
...
src/Compilers/Core/MSBuildTaskTests/Microsoft.Build.Tasks.CodeAnalysis.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.BuildTasks.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.BuildTasks.UnitTests
</RootNamespace>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<Nullable>
enable
</Nullable>
<Nullable>
enable
</Nullable>
<!-- Multiple test failures -->
<!-- Multiple test failures -->
...
...
src/Compilers/Core/MSBuildTaskTests/TargetTests.cs
浏览文件 @
093ea477
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
using
System.Reflection
;
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.CompilerServices
;
using
System.Xml
;
using
System.Xml
;
using
Roslyn.Test.Utilities
;
using
Microsoft.Build.Evaluation
;
using
Microsoft.Build.Evaluation
;
using
Microsoft.Build.Execution
;
using
Microsoft.Build.Execution
;
using
Microsoft.Build.Framework
;
using
Microsoft.Build.Framework
;
...
@@ -265,15 +266,15 @@ public void GenerateEditorConfigCoreEvaluatesMetadata()
...
@@ -265,15 +266,15 @@ public void GenerateEditorConfigCoreEvaluatesMetadata()
Assert
.
Equal
(
"_GeneratedEditorConfigMetadata"
,
item
.
ItemType
);
Assert
.
Equal
(
"_GeneratedEditorConfigMetadata"
,
item
.
ItemType
);
var
itemType
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"ItemType"
);
var
itemType
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"ItemType"
);
Assert
.
NotNull
(
itemType
);
Assert
Ex
.
NotNull
(
itemType
);
Assert
.
Equal
(
"Compile"
,
itemType
.
EvaluatedValue
);
Assert
.
Equal
(
"Compile"
,
itemType
.
EvaluatedValue
);
var
metaName
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"MetadataName"
);
var
metaName
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"MetadataName"
);
Assert
.
NotNull
(
metaName
);
Assert
Ex
.
NotNull
(
metaName
);
Assert
.
Equal
(
"CustomMeta"
,
metaName
.
EvaluatedValue
);
Assert
.
Equal
(
"CustomMeta"
,
metaName
.
EvaluatedValue
);
var
customMeta
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
metaName
.
EvaluatedValue
);
var
customMeta
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
metaName
.
EvaluatedValue
);
Assert
.
NotNull
(
customMeta
);
Assert
Ex
.
NotNull
(
customMeta
);
Assert
.
Equal
(
"abc"
,
customMeta
.
EvaluatedValue
);
Assert
.
Equal
(
"abc"
,
customMeta
.
EvaluatedValue
);
}
}
...
@@ -307,15 +308,15 @@ public void GenerateEditorConfigCoreEvaluatesDynamicMetadata()
...
@@ -307,15 +308,15 @@ public void GenerateEditorConfigCoreEvaluatesDynamicMetadata()
Assert
.
Equal
(
"_GeneratedEditorConfigMetadata"
,
item
.
ItemType
);
Assert
.
Equal
(
"_GeneratedEditorConfigMetadata"
,
item
.
ItemType
);
var
itemType
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"ItemType"
);
var
itemType
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"ItemType"
);
Assert
.
NotNull
(
itemType
);
Assert
Ex
.
NotNull
(
itemType
);
Assert
.
Equal
(
"Compile"
,
itemType
.
EvaluatedValue
);
Assert
.
Equal
(
"Compile"
,
itemType
.
EvaluatedValue
);
var
metaName
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"MetadataName"
);
var
metaName
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"MetadataName"
);
Assert
.
NotNull
(
metaName
);
Assert
Ex
.
NotNull
(
metaName
);
Assert
.
Equal
(
"CustomMeta"
,
metaName
.
EvaluatedValue
);
Assert
.
Equal
(
"CustomMeta"
,
metaName
.
EvaluatedValue
);
var
customMeta
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
metaName
.
EvaluatedValue
);
var
customMeta
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
metaName
.
EvaluatedValue
);
Assert
.
NotNull
(
customMeta
);
Assert
Ex
.
NotNull
(
customMeta
);
Assert
.
Equal
(
"abc"
,
customMeta
.
EvaluatedValue
);
Assert
.
Equal
(
"abc"
,
customMeta
.
EvaluatedValue
);
}
}
...
@@ -347,11 +348,11 @@ public void GenerateEditorConfigCoreHandlesMissingMetadata()
...
@@ -347,11 +348,11 @@ public void GenerateEditorConfigCoreHandlesMissingMetadata()
Assert
.
Equal
(
"_GeneratedEditorConfigMetadata"
,
item
.
ItemType
);
Assert
.
Equal
(
"_GeneratedEditorConfigMetadata"
,
item
.
ItemType
);
var
itemType
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"ItemType"
);
var
itemType
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"ItemType"
);
Assert
.
NotNull
(
itemType
);
Assert
Ex
.
NotNull
(
itemType
);
Assert
.
Equal
(
"Compile"
,
itemType
.
EvaluatedValue
);
Assert
.
Equal
(
"Compile"
,
itemType
.
EvaluatedValue
);
var
metaName
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"MetadataName"
);
var
metaName
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"MetadataName"
);
Assert
.
NotNull
(
metaName
);
Assert
Ex
.
NotNull
(
metaName
);
Assert
.
Equal
(
"CustomMeta"
,
metaName
.
EvaluatedValue
);
Assert
.
Equal
(
"CustomMeta"
,
metaName
.
EvaluatedValue
);
}
}
...
@@ -382,11 +383,11 @@ public void GenerateEditorConfigCoreHandlesMalformedCompilerVisibleItemMetadata(
...
@@ -382,11 +383,11 @@ public void GenerateEditorConfigCoreHandlesMalformedCompilerVisibleItemMetadata(
Assert
.
Equal
(
"_GeneratedEditorConfigMetadata"
,
item
.
ItemType
);
Assert
.
Equal
(
"_GeneratedEditorConfigMetadata"
,
item
.
ItemType
);
var
itemType
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"ItemType"
);
var
itemType
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"ItemType"
);
Assert
.
NotNull
(
itemType
);
Assert
Ex
.
NotNull
(
itemType
);
Assert
.
Equal
(
"Compile"
,
itemType
.
EvaluatedValue
);
Assert
.
Equal
(
"Compile"
,
itemType
.
EvaluatedValue
);
var
metaName
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"MetadataName"
);
var
metaName
=
item
.
Metadata
.
SingleOrDefault
(
m
=>
m
.
Name
==
"MetadataName"
);
Assert
.
NotNull
(
metaName
);
Assert
Ex
.
NotNull
(
metaName
);
Assert
.
Equal
(
""
,
metaName
.
EvaluatedValue
);
Assert
.
Equal
(
""
,
metaName
.
EvaluatedValue
);
}
}
...
...
src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj
浏览文件 @
093ea477
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.CompilerServer.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.CompilerServer.UnitTests
</RootNamespace>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<!--
<!--
Currently fails on CI against old versions of mono
Currently fails on CI against old versions of mono
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
<ProjectReference
Include=
"..\..\CSharp\Portable\Microsoft.CodeAnalysis.CSharp.csproj"
/>
<ProjectReference
Include=
"..\..\CSharp\Portable\Microsoft.CodeAnalysis.CSharp.csproj"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"System"
Condition=
"'$(TargetFramework)' != 'net
coreapp3.1
'"
/>
<Reference
Include=
"System"
Condition=
"'$(TargetFramework)' != 'net
5.0
'"
/>
<Reference
Include=
"System.Xml"
Condition=
"'$(TargetFramework)' != 'net
coreapp3.1
'"
/>
<Reference
Include=
"System.Xml"
Condition=
"'$(TargetFramework)' != 'net
5.0
'"
/>
<PackageReference
Include=
"Microsoft.DiaSymReader"
Version=
"$(MicrosoftDiaSymReaderVersion)"
/>
<PackageReference
Include=
"Microsoft.DiaSymReader"
Version=
"$(MicrosoftDiaSymReaderVersion)"
/>
<PackageReference
Include=
"Moq"
Version=
"$(MoqVersion)"
/>
<PackageReference
Include=
"Moq"
Version=
"$(MoqVersion)"
/>
</ItemGroup>
</ItemGroup>
...
...
src/Compilers/VisualBasic/Test/Emit/Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests.vbproj
浏览文件 @
093ea477
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<RootNamespace></RootNamespace>
<RootNamespace></RootNamespace>
<!-- Disabling on assumption -->
<!-- Disabling on assumption -->
...
...
src/Compilers/VisualBasic/Test/IOperation/Roslyn.Compilers.VisualBasic.IOperation.UnitTests.vbproj
浏览文件 @
093ea477
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<RootNamespace></RootNamespace>
<RootNamespace></RootNamespace>
</PropertyGroup>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ItemGroup
Label=
"Project References"
>
...
...
src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj
浏览文件 @
093ea477
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<RootNamespace></RootNamespace>
<RootNamespace></RootNamespace>
<!--
<!--
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<ProjectReference
Include=
"..\..\Portable\Microsoft.CodeAnalysis.VisualBasic.vbproj"
/>
<ProjectReference
Include=
"..\..\Portable\Microsoft.CodeAnalysis.VisualBasic.vbproj"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<PackageReference
Include=
"System.Drawing.Common"
Version=
"$(SystemDrawingCommonVersion)"
Condition=
"$(TargetFramework) == 'net
coreapp3.1
'"
/>
<PackageReference
Include=
"System.Drawing.Common"
Version=
"$(SystemDrawingCommonVersion)"
Condition=
"$(TargetFramework) == 'net
5.0
'"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Folder
Include=
"My Project\"
/>
<Folder
Include=
"My Project\"
/>
...
...
src/Compilers/VisualBasic/Test/Symbol/Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests.vbproj
浏览文件 @
093ea477
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
<RootNamespace></RootNamespace>
<RootNamespace></RootNamespace>
<!-- A zillion test failures + crash. See https://github.com/mono/mono/issues/10756. -->
<!-- A zillion test failures + crash. See https://github.com/mono/mono/issues/10756. -->
...
...
src/Compilers/VisualBasic/Test/Symbol/SymbolsTests/InstantiatingGenerics.vb
浏览文件 @
093ea477
...
@@ -11,7 +11,7 @@ Imports Microsoft.CodeAnalysis.VisualBasic
...
@@ -11,7 +11,7 @@ Imports Microsoft.CodeAnalysis.VisualBasic
Imports
Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports
Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports
Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports
Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports
Roslyn.Test.Utilities
Imports
Roslyn.Test.Utilities
Imports
ReferenceEqualityComparer
=
Roslyn
.
Utilities
.
ReferenceEqualityComparer
Namespace
Microsoft.CodeAnalysis.VisualBasic.UnitTests.Symbols
Namespace
Microsoft.CodeAnalysis.VisualBasic.UnitTests.Symbols
...
...
src/Compilers/VisualBasic/Test/Syntax/Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests.vbproj
浏览文件 @
093ea477
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<TargetFrameworks>
net
coreapp3.1
;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0
;net472
</TargetFrameworks>
</PropertyGroup>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ItemGroup
Label=
"Project References"
>
<ProjectReference
Include=
"..\..\..\..\Test\Utilities\Portable\Roslyn.Test.Utilities.csproj"
/>
<ProjectReference
Include=
"..\..\..\..\Test\Utilities\Portable\Roslyn.Test.Utilities.csproj"
/>
...
...
src/Test/Utilities/Portable/Assert/AssertEx.cs
浏览文件 @
093ea477
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Collections.Immutable
;
using
System.Collections.Immutable
;
using
System.Diagnostics
;
using
System.Diagnostics.CodeAnalysis
;
using
System.IO
;
using
System.IO
;
using
System.Linq
;
using
System.Linq
;
using
System.Reflection
;
using
System.Reflection
;
...
@@ -793,5 +795,14 @@ public static void Equal<T>(T[,] expected, Func<int, int, T> getResult, Func<T,
...
@@ -793,5 +795,14 @@ public static void Equal<T>(T[,] expected, Func<int, int, T> getResult, Func<T,
Assert
.
True
(
false
,
builder
.
ToString
());
Assert
.
True
(
false
,
builder
.
ToString
());
}
}
}
}
#
nullable
enable
public
static
void
NotNull
<
T
>([
NotNull
]
T
value
)
{
Assert
.
NotNull
(
value
);
Debug
.
Assert
(
value
is
object
);
}
#
nullable
disable
}
}
}
}
src/Workspaces/CoreTestUtilities/Roslyn.Services.UnitTests.Utilities.csproj
浏览文件 @
093ea477
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<PropertyGroup>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.UnitTests
</RootNamespace>
<RootNamespace>
Microsoft.CodeAnalysis.UnitTests
</RootNamespace>
<TargetFrameworks>
netcoreapp3.1;net472
</TargetFrameworks>
<TargetFrameworks>
net
5.0;net
coreapp3.1;net472
</TargetFrameworks>
<UseWpf>
true
</UseWpf>
<UseWpf>
true
</UseWpf>
<IsShipping>
false
</IsShipping>
<IsShipping>
false
</IsShipping>
<ExcludeFromSourceBuild>
true
</ExcludeFromSourceBuild>
<ExcludeFromSourceBuild>
true
</ExcludeFromSourceBuild>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录