未验证 提交 093ea477 编写于 作者: J Jared Parsons 提交者: GitHub

Merge pull request #46383 from jaredpar/test-net50

Move unit tests to net5.0
...@@ -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\\.*") }
......
...@@ -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=net5.0%3Bnetcoreapp3.1"
mono_tool="" mono_tool=""
fi fi
......
...@@ -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>
......
...@@ -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 NETCOREAPP3_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 NETCOREAPP3_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"));
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.0;net472</TargetFrameworks>
<GenerateMicrosoftCodeAnalysisCommitHashAttribute>true</GenerateMicrosoftCodeAnalysisCommitHashAttribute> <GenerateMicrosoftCodeAnalysisCommitHashAttribute>true</GenerateMicrosoftCodeAnalysisCommitHashAttribute>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.0;net472</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<ItemGroup Label="Project References"> <ItemGroup Label="Project References">
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.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" />
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.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" />
......
...@@ -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
{ {
......
...@@ -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
{ {
...@@ -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
{ {
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.0;net472</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<ItemGroup Label="Project References"> <ItemGroup Label="Project References">
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.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>
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.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">
......
...@@ -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=''",
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.0;net472</TargetFrameworks>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<!-- Multiple test failures --> <!-- Multiple test failures -->
......
...@@ -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); AssertEx.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); AssertEx.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); AssertEx.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); AssertEx.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); AssertEx.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); AssertEx.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); AssertEx.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); AssertEx.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); AssertEx.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); AssertEx.NotNull(metaName);
Assert.Equal("", metaName.EvaluatedValue); Assert.Equal("", metaName.EvaluatedValue);
} }
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.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)' != 'netcoreapp3.1'" /> <Reference Include="System" Condition="'$(TargetFramework)' != 'net5.0'" />
<Reference Include="System.Xml" Condition="'$(TargetFramework)' != 'netcoreapp3.1'" /> <Reference Include="System.Xml" Condition="'$(TargetFramework)' != 'net5.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>
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.0;net472</TargetFrameworks>
<RootNamespace></RootNamespace> <RootNamespace></RootNamespace>
<!-- Disabling on assumption --> <!-- Disabling on assumption -->
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.0;net472</TargetFrameworks>
<RootNamespace></RootNamespace> <RootNamespace></RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup Label="Project References"> <ItemGroup Label="Project References">
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.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) == 'netcoreapp3.1'" /> <PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" Condition="$(TargetFramework) == 'net5.0'" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="My Project\" /> <Folder Include="My Project\" />
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.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. -->
......
...@@ -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
......
...@@ -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>netcoreapp3.1;net472</TargetFrameworks> <TargetFrameworks>net5.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" />
......
...@@ -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
} }
} }
...@@ -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>net5.0;netcoreapp3.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.
先完成此消息的编辑!
想要评论请 注册