-
Notifications
You must be signed in to change notification settings - Fork 344
Added System.Memory.Polyfill Project #2339
Changes from 1 commit
c8d31c4
8ee6979
33da66f
ee23d6b
132efef
f6d44ca
954f079
3c3b978
6b160a7
a5dfae9
b89ba55
23415be
8a5e662
42e41c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,7 @@ public class Int32Tests | |
[Fact] | ||
public void Int32TryParse() | ||
{ | ||
char[] buffer = int.MaxValue.ToString().ToCharArray(); | ||
ReadOnlySpan<char> span = buffer.AsSpan(); | ||
ReadOnlySpan<char> span = int.MaxValue.ToString().ToCharArray().AsSpan(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed in the new PR |
||
Assert.True(Int32Polyfill.TryParse(span, out int value)); | ||
Assert.Equal(int.MaxValue, value); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="..\..\tools\common.props" /> | ||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(TargetsWindows)' == 'true'"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is listing netcoreapp2.1 TFM here redundant or required (for Windows only)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed it in the new PR. This actually did not work in the CI. I changed it to use netcoreapp2.0 to force the fallback path. |
||
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks> | ||
<AssemblyOriginatorKeyFile>../../tools/test_key.snk</AssemblyOriginatorKeyFile> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you remove these properties? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ericstj suggested that they were not necessary for tests. |
||
<SignAssembly>true</SignAssembly> | ||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign> | ||
<Description></Description> | ||
<Copyright>Microsoft Corporation, All rights reserved</Copyright> | ||
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="xunit" Version="2.3.1" /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use SystemBuffersVersion instead of SystemMemoryVersion.