Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Aug 29, 2023
2 parents 44633e5 + 540ee91 commit 7839f46
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>1.27.0</Version>
<Version>1.27.1</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Polyfill</PackageTags>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
<SignAssembly>false</SignAssembly>
<NoWarn>CS1591;NETSDK1138;NU1901;NU1902</NoWarn>
<NoWarn>CS1591;NETSDK1138;NU1901;NU1902;NU1903</NoWarn>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<LangVersion>11</LangVersion>
<ImplicitUsings>false</ImplicitUsings>
Expand Down
4 changes: 3 additions & 1 deletion src/Polyfill/Nullability/NullabilityInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#nullable enable

using System.Linq;
using System.Diagnostics.CodeAnalysis;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

Expand All @@ -15,7 +16,8 @@ namespace System.Reflection
/// <summary>
/// A class that represents nullability info
/// </summary>
#if PolyPublic
[ExcludeFromCodeCoverage]
#if PolyPublic
public
#endif
sealed class NullabilityInfo
Expand Down
4 changes: 3 additions & 1 deletion src/Polyfill/Nullability/NullabilityInfoContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#nullable enable

using System.Linq;
using System.Diagnostics.CodeAnalysis;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

Expand All @@ -18,7 +19,8 @@ namespace System.Reflection
/// Provides APIs for populating nullability information/context from reflection members:
/// <see cref="ParameterInfo"/>, <see cref="FieldInfo"/>, <see cref="PropertyInfo"/> and <see cref="EventInfo"/>.
/// </summary>
#if PolyPublic
[ExcludeFromCodeCoverage]
#if PolyPublic
public
#endif
sealed class NullabilityInfoContext
Expand Down
2 changes: 2 additions & 0 deletions src/Tests/NullabilitySync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public async Task Run()
#nullable enable

using System.Linq;
using System.Diagnostics.CodeAnalysis;

""";

Expand Down Expand Up @@ -73,6 +74,7 @@ static string MakeInternal(string source) =>
.Replace(
"public sealed class",
"""
[ExcludeFromCodeCoverage]
#if PolyPublic
public
#endif
Expand Down
12 changes: 6 additions & 6 deletions src/Tests/PolyfillExtensionsTests_IEnumerable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public void Chunk_SizeOf3()

var chunks = enumerable.Chunk(3).ToList();

Assert.AreEqual(new int[] { 1, 2, 3 }, chunks[0]);
Assert.AreEqual(new int[] { 4, 5, 6 }, chunks[1]);
Assert.AreEqual(new int[] { 7, 8, 9 }, chunks[2]);
Assert.AreEqual(new int[] { 10, 11 }, chunks[3]);
Assert.AreEqual(new[] { 1, 2, 3 }, chunks[0]);
Assert.AreEqual(new[] { 4, 5, 6 }, chunks[1]);
Assert.AreEqual(new[] { 7, 8, 9 }, chunks[2]);
Assert.AreEqual(new[] { 10, 11 }, chunks[3]);
}

[Test]
Expand All @@ -59,8 +59,8 @@ public void Chunk_SizeOf8()

var chunks = enumerable.Chunk(8).ToList();

Assert.AreEqual(new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }, chunks[0]);
Assert.AreEqual(new int[] { 9, 10, 11 }, chunks[1]);
Assert.AreEqual(new[] { 1, 2, 3, 4, 5, 6, 7, 8 }, chunks[0]);
Assert.AreEqual(new[] { 9, 10, 11 }, chunks[1]);
}

[Test]
Expand Down
4 changes: 1 addition & 3 deletions src/Tests/UnreachableExceptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ namespace Tests;
public class UnreachableExceptionTests
{
[Test]
public void UnreachableException_Compatiblity_with_all_TargetFrameworks()
{
public void UnreachableException_Compatibility_with_all_TargetFrameworks() =>
_ = Assert.Throws<UnreachableException>(() => throw new UnreachableException());
}
}

0 comments on commit 7839f46

Please sign in to comment.