Skip to content

Commit

Permalink
Merge pull request #6364 from Youssef1313/net7-tests
Browse files Browse the repository at this point in the history
Move tests to target .NET 7
  • Loading branch information
jmarolf authored Jan 10, 2023
2 parents 7b6ad7e + 8681ec1 commit 3168c39
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<DefineConstants>$(DefineConstants),NET_ANALYZERS_TEST</DefineConstants>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
<NoWarn>$(NoWarn);xUnit1000;CA1812</NoWarn>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Test.Utilities/Test.Utilities.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<NonShipping>true</NonShipping>
<IsShipping>false</IsShipping>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
<IsShipping>false</IsShipping>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
<NonShipping>true</NonShipping>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private static Func<IOperation, IMethodSymbol> CreateFunctionPointerSignatureAcc

var operation = Expression.Variable(typeof(IOperation));

return Expression.Lambda<Func<IOperation, IMethodSymbol>>(Expression.Call(targetMethod, Expression.Convert(operation, WrappedType)), operation).Compile();
return Expression.Lambda<Func<IOperation, IMethodSymbol>>(Expression.Call(targetMethod, Expression.Convert(operation, wrappedType)), operation).Compile();
}

private IFunctionPointerInvocationOperationWrapper(IOperation operation)
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Compiler/Lightup/LightupHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static Func<T, TProperty> CreatePropertyAccessor<T, TProperty>(Type? typ
? parameter
: Expression.Convert(parameter, type);

Expression result = Expression.Call(instance, property.GetMethod);
Expression result = Expression.Call(instance, property.GetMethod!);
if (!typeof(TProperty).GetTypeInfo().IsAssignableFrom(property.PropertyType.GetTypeInfo()))
{
result = Expression.Convert(result, typeof(TProperty));
Expand Down
4 changes: 2 additions & 2 deletions src/Utilities/Compiler/RulesetToEditorconfigConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static XElement GetTopLevelRulesetNode(string rulesetFilePath)
var ruleSetDocument = XDocument.Load(xmlReader);

// Find the top level rule set node
var rulesetNode = ruleSetDocument.Elements(RuleSetNodeName).FirstOrDefault();
var rulesetNode = ruleSetDocument.Elements(RuleSetNodeName).First();
Debug.Assert(rulesetNode.Name == RuleSetNodeName);
return rulesetNode;
}
Expand Down Expand Up @@ -143,7 +143,7 @@ static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string,
if (node is XElement ruleNode &&
ruleNode.Name == RuleNodeName)
{
XAttribute ruleId = ruleNode.Attribute(RuleIdAttributeName);
XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
if (ruleId != null)
{
foreach (var comment in ruleNode.Nodes().OfType<XComment>())
Expand Down

0 comments on commit 3168c39

Please sign in to comment.