Skip to content

Commit

Permalink
[master] Update dependencies from dotnet/coreclr (dotnet#36596)
Browse files Browse the repository at this point in the history
* Update dependencies from https://github.com/dotnet/coreclr build 20190403.72

- Microsoft.NET.Sdk.IL - 3.0.0-preview4-27603-72
- Microsoft.NETCore.ILAsm - 3.0.0-preview4-27603-72
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview4-27603-72

* Update dependencies from https://github.com/dotnet/coreclr build 20190404.75

- Microsoft.NET.Sdk.IL - 3.0.0-preview4-27604-75
- Microsoft.NETCore.ILAsm - 3.0.0-preview4-27604-75
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview4-27604-75

* Update dependencies from https://github.com/dotnet/coreclr build 20190405.73

- Microsoft.NET.Sdk.IL - 3.0.0-preview5-27605-73
- Microsoft.NETCore.ILAsm - 3.0.0-preview5-27605-73
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview5-27605-73

* Update dependencies from https://github.com/dotnet/coreclr build 20190406.72

- Microsoft.NET.Sdk.IL - 3.0.0-preview5-27606-72
- Microsoft.NETCore.ILAsm - 3.0.0-preview5-27606-72
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview5-27606-72

* Fix argument name in Buffer.BlockCopy test

* Update StreamWriters tests for BaseStream dispose change

* Updated tests for new PtrToStringUTF8 behavior
  • Loading branch information
dotnet-maestro[bot] authored Apr 8, 2019
1 parent 2190a0f commit 1d63519
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 24 deletions.
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.NETCore.Runtime.CoreCLR" Version="3.0.0-preview4-27527-73">
<Dependency Name="Microsoft.NETCore.Runtime.CoreCLR" Version="3.0.0-preview5-27606-72">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>f1440bb696e2eee957a30f37c6c735f51696edad</Sha>
<Sha>aea7846fc71591739e47c65c0632007bff1cc4a4</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.ILAsm" Version="3.0.0-preview4-27527-73">
<Dependency Name="Microsoft.NETCore.ILAsm" Version="3.0.0-preview5-27606-72">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>f1440bb696e2eee957a30f37c6c735f51696edad</Sha>
<Sha>aea7846fc71591739e47c65c0632007bff1cc4a4</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.IL" Version="3.0.0-preview4-27527-73">
<Dependency Name="Microsoft.NET.Sdk.IL" Version="3.0.0-preview5-27606-72">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>f1440bb696e2eee957a30f37c6c735f51696edad</Sha>
<Sha>aea7846fc71591739e47c65c0632007bff1cc4a4</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<MicrosoftNETCoreDotNetHostPackageVersion>3.0.0-preview5-27606-01</MicrosoftNETCoreDotNetHostPackageVersion>
<MicrosoftNETCoreDotNetHostPolicyPackageVersion>3.0.0-preview5-27606-01</MicrosoftNETCoreDotNetHostPolicyPackageVersion>
<!-- Coreclr dependencies -->
<MicrosoftNETCoreILAsmPackageVersion>3.0.0-preview4-27527-73</MicrosoftNETCoreILAsmPackageVersion>
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview4-27527-73</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
<MicrosoftNETCoreILAsmPackageVersion>3.0.0-preview5-27606-72</MicrosoftNETCoreILAsmPackageVersion>
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview5-27606-72</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
<!-- Corefx dependencies -->
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview5.19206.5</MicrosoftNETCorePlatformsPackageVersion>
<!-- Standard dependencies -->
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19205.6",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19205.6",
"Microsoft.NET.Sdk.IL": "3.0.0-preview4-27527-73"
"Microsoft.NET.Sdk.IL": "3.0.0-preview5-27606-72"
}
}
5 changes: 4 additions & 1 deletion src/System.IO/tests/StreamWriter/StreamWriter.CloseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ public void AfterCloseThrows()

private void ValidateDisposedExceptions(StreamWriter sw)
{
Assert.Null(sw.BaseStream);
if (PlatformDetection.IsNetCore)
{
Assert.NotNull(sw.BaseStream);
}
Assert.Throws<ObjectDisposedException>(() => sw.Write('A'));
Assert.Throws<ObjectDisposedException>(() => sw.Write("hello"));
Assert.Throws<ObjectDisposedException>(() => sw.Flush());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<Compile Include="System\Runtime\InteropServices\Marshal\ReleaseComObjectTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStructureTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringAnsiTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringAutoTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringBSTR.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringUniTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringUTF8Tests.cs" Condition="'$(TargetGroup)' == 'netcoreapp'" />
Expand Down Expand Up @@ -175,4 +176,4 @@
<Compile Include="System\Runtime\InteropServices\TypeLibVarAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\TypeLibVersionAttributeTests.cs" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public void PtrToStringAnsi_ZeroPointer_ThrowsArgumentNullException()
}

[Fact]
public void PtrToStringAnsi_NegativeLength_ThrowsArgumentExeption()
public void PtrToStringAnsi_NegativeLength_ThrowsArgumentOutOfRangeExeption()
{
AssertExtensions.Throws<ArgumentException>("len", null, () => Marshal.PtrToStringAnsi(new IntPtr(123), -77));
AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("len", null, () => Marshal.PtrToStringAnsi(new IntPtr(123), -77));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public void PtrToStringAuto_ZeroPtrWithLength_ThrowsArgumentNullException()
}

[Fact]
public void PtrToStringAuto_NegativeLength_ThrowsArgumentException()
public void PtrToStringAuto_NegativeLength_ThrowsArgumentOutOfRangeException()
{
string s = "Hello World";
IntPtr ptr = Marshal.StringToCoTaskMemAuto(s);
try
{
AssertExtensions.Throws<ArgumentException>("len", null, () => Marshal.PtrToStringAuto(ptr, -1));
AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>(() => Marshal.PtrToStringAuto(ptr, -1));
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public void PtrToStringUTF8_Length_Success(string s, int len)
public void PtrToStringUTF8_ZeroPointer_ReturnsNull()
{
Assert.Null(Marshal.PtrToStringUTF8(IntPtr.Zero));
Assert.Null(Marshal.PtrToStringUTF8(IntPtr.Zero, 0));
Assert.Null(Marshal.PtrToStringUTF8(IntPtr.Zero, 1));
}

[Fact]
Expand All @@ -41,14 +39,21 @@ public void PtrToStringUTF8_Win32AtomPointer_ReturnsNull()
{
// Windows Marshal has specific checks that does not do
// anything if the ptr is less than 64K.
Assert.Null(Marshal.PtrToStringUTF8((IntPtr)1, 10));
Assert.Null(Marshal.PtrToStringUTF8((IntPtr)1));
}

[Fact]
public void PtrToStringUTF8_NegativeLength_ThrowsArgumentOutOfRangeExeption()
[SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
public void PtrToStringUTF8_ZeroPointer_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("byteLen", null, () => Marshal.PtrToStringUTF8(new IntPtr(123), -77));
AssertExtensions.Throws<ArgumentOutOfRangeException>("byteLen", null, () => Marshal.PtrToStringUTF8(IntPtr.Zero, -77));
AssertExtensions.Throws<ArgumentNullException>("ptr", () => Marshal.PtrToStringUTF8(IntPtr.Zero, 123));
}

[Fact]
[SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
public void PtrToStringUTF8_NegativeLength_ThrowsArgumentExeption()
{
AssertExtensions.Throws<ArgumentException>("byteLen", null, () => Marshal.PtrToStringUTF8(new IntPtr(123), -77));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public void PtrToStringUni_ZeroPointer_ThrowsArgumentNullException()
}

[Fact]
public void PtrToStringUni_NegativeLength_ThrowsArgumentExeption()
public void PtrToStringUni_NegativeLength_ThrowsArgumentOutOfRangeExeption()
{
AssertExtensions.Throws<ArgumentException>("len", null, () => Marshal.PtrToStringUni(new IntPtr(123), -77));
AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("len", null, () => Marshal.PtrToStringUni(new IntPtr(123), -77));
}
}
}
2 changes: 1 addition & 1 deletion src/System.Runtime/tests/System/BufferTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void BlockCopy_Invalid()
AssertExtensions.Throws<ArgumentOutOfRangeException>("count", () => Buffer.BlockCopy(new byte[3], 0, new byte[3], 0, -1)); // Count < 0

AssertExtensions.Throws<ArgumentException>("src", () => Buffer.BlockCopy(new string[3], 0, new byte[3], 0, 0)); // Src is not a byte array
AssertExtensions.Throws<ArgumentException>("dest", () => Buffer.BlockCopy(new byte[3], 0, new string[3], 0, 0)); // Dst is not a byte array
AssertExtensions.Throws<ArgumentException>("dst", "dest", () => Buffer.BlockCopy(new byte[3], 0, new string[3], 0, 0)); // Dst is not a byte array

AssertExtensions.Throws<ArgumentException>("", () => Buffer.BlockCopy(new byte[3], 3, new byte[3], 0, 1)); // SrcOffset + count >= src.length
AssertExtensions.Throws<ArgumentException>("", () => Buffer.BlockCopy(new byte[3], 4, new byte[3], 0, 0)); // SrcOffset >= src.Length
Expand Down

0 comments on commit 1d63519

Please sign in to comment.