Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

[master] Update dependencies from dotnet/coreclr #37953

Merged
merged 5 commits into from
May 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-preview6-27721-71">
<Dependency Name="Microsoft.NETCore.Runtime.CoreCLR" Version="3.0.0-preview6.19277.72">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>22288107a7acf7a3cf40f72c0464a722c80b7ba9</Sha>
<Sha>419b46fc7d0fe0659e7ab521c222b7c921b36e35</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.ILAsm" Version="3.0.0-preview6-27721-71">
<Dependency Name="Microsoft.NETCore.ILAsm" Version="3.0.0-preview6.19277.72">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>22288107a7acf7a3cf40f72c0464a722c80b7ba9</Sha>
<Sha>419b46fc7d0fe0659e7ab521c222b7c921b36e35</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.IL" Version="3.0.0-preview6-27721-71">
<Dependency Name="Microsoft.NET.Sdk.IL" Version="3.0.0-preview6.19277.72">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>22288107a7acf7a3cf40f72c0464a722c80b7ba9</Sha>
<Sha>419b46fc7d0fe0659e7ab521c222b7c921b36e35</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 @@ -40,8 +40,8 @@
<MicrosoftNETCoreDotNetHostPackageVersion>3.0.0-preview6-27724-03</MicrosoftNETCoreDotNetHostPackageVersion>
<MicrosoftNETCoreDotNetHostPolicyPackageVersion>3.0.0-preview6-27724-03</MicrosoftNETCoreDotNetHostPolicyPackageVersion>
<!-- Coreclr dependencies -->
<MicrosoftNETCoreILAsmPackageVersion>3.0.0-preview6-27721-71</MicrosoftNETCoreILAsmPackageVersion>
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview6-27721-71</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
<MicrosoftNETCoreILAsmPackageVersion>3.0.0-preview6.19277.72</MicrosoftNETCoreILAsmPackageVersion>
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview6.19277.72</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
<!-- Corefx dependencies -->
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview6.19274.8</MicrosoftNETCorePlatformsPackageVersion>
<runtimenativeSystemIOPortsPackageVersion>4.6.0-preview6.19274.8</runtimenativeSystemIOPortsPackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19274.6",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19274.6",
"FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0",
"Microsoft.NET.Sdk.IL": "3.0.0-preview6-27721-71"
"Microsoft.NET.Sdk.IL": "3.0.0-preview6.19277.72"
}
}
56 changes: 15 additions & 41 deletions src/System.Runtime.Extensions/tests/System/AppDomainTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,52 +410,26 @@ public void ReflectionOnlyGetAssemblies()
Assert.Equal(0, AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies().Length);
}

[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[Fact]
public void MonitoringIsEnabled()
{
RemoteExecutor.Invoke(() => {
Assert.False(AppDomain.MonitoringIsEnabled);
Assert.Throws<ArgumentException>(() => { AppDomain.MonitoringIsEnabled = false; });

if (PlatformDetection.IsFullFramework)
{
AppDomain.MonitoringIsEnabled = true;
Assert.True(AppDomain.MonitoringIsEnabled);
}
else
{
Assert.Throws<PlatformNotSupportedException>(() => { AppDomain.MonitoringIsEnabled = true; });
}
return RemoteExecutor.SuccessExitCode;
}).Dispose();
}

[Fact]
public void MonitoringSurvivedMemorySize()
{
Assert.Throws<InvalidOperationException>(() => { var t = AppDomain.CurrentDomain.MonitoringSurvivedMemorySize; });
}
Assert.True(AppDomain.MonitoringIsEnabled);
Assert.Throws<ArgumentException>(() => { AppDomain.MonitoringIsEnabled = false; });
AppDomain.MonitoringIsEnabled = true;

[Fact]
public void MonitoringSurvivedProcessMemorySize()
{
Assert.Throws<InvalidOperationException>(() => { var t = AppDomain.MonitoringSurvivedProcessMemorySize; });
}
object o = new object();
Assert.InRange(AppDomain.MonitoringSurvivedProcessMemorySize, 1, long.MaxValue);
Assert.InRange(AppDomain.CurrentDomain.MonitoringSurvivedMemorySize, 1, long.MaxValue);
Assert.InRange(AppDomain.CurrentDomain.MonitoringTotalAllocatedMemorySize, 1, long.MaxValue);
GC.KeepAlive(o);

[Fact]
public void MonitoringTotalAllocatedMemorySize()
{
Assert.Throws<InvalidOperationException>(() => {
var t = AppDomain.CurrentDomain.MonitoringTotalAllocatedMemorySize;
});
}

[Fact]
public void MonitoringTotalProcessorTime()
{
Assert.Throws<InvalidOperationException>(() => {
var t = AppDomain.CurrentDomain.MonitoringTotalProcessorTime;
});
using (Process p = Process.GetCurrentProcess())
{
TimeSpan processTime = p.UserProcessorTime;
TimeSpan monitoringTime = AppDomain.CurrentDomain.MonitoringTotalProcessorTime;
Assert.InRange(monitoringTime, processTime, TimeSpan.MaxValue);
}
}

#pragma warning disable 618
Expand Down
18 changes: 17 additions & 1 deletion src/System.Runtime/tests/System/Text/StringBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,6 @@ public static IEnumerable<object[]> AppendFormat_TestData()
yield return new object[] { "Hello", null, ", Foo {0,9:D6}", new object[] { 1 }, "Hello, Foo 000001" }; // Positive minimum length and custom format
yield return new object[] { "Hello", null, ", Foo {0,-9:D6}", new object[] { 1 }, "Hello, Foo 000001 " }; // Negative length and custom format

yield return new object[] { "Hello", null, ", Foo {0:{{X}}Y{{Z}}} {0:X{{Y}}Z}", new object[] { 1 }, "Hello, Foo {X}Y{Z} X{Y}Z" }; // Custom format (with escaped curly braces)
yield return new object[] { "Hello", null, ", Foo {{{0}", new object[] { 1 }, "Hello, Foo {1" }; // Escaped open curly braces
yield return new object[] { "Hello", null, ", Foo }}{0}", new object[] { 1 }, "Hello, Foo }1" }; // Escaped closed curly braces
yield return new object[] { "Hello", null, ", Foo {0} {{0}}", new object[] { 1 }, "Hello, Foo 1 {0}" }; // Escaped placeholder
Expand Down Expand Up @@ -894,6 +893,7 @@ public static void AppendFormat_Invalid()

Assert.Throws<FormatException>(() => builder.AppendFormat("}", "")); // Format has unescaped }
Assert.Throws<FormatException>(() => builder.AppendFormat("}a", "")); // Format has unescaped }
Assert.Throws<FormatException>(() => builder.AppendFormat("{0:}}", "")); // Format has unescaped }

Assert.Throws<FormatException>(() => builder.AppendFormat("{\0", "")); // Format has invalid character after {
Assert.Throws<FormatException>(() => builder.AppendFormat("{a", "")); // Format has invalid character after {
Expand All @@ -917,6 +917,22 @@ public static void AppendFormat_Invalid()
Assert.Throws<FormatException>(() => builder.AppendFormat("{0: ", new string[10])); // Format with colon and spaces is not closed

Assert.Throws<FormatException>(() => builder.AppendFormat("{0:{", new string[10])); // Format with custom format contains unescaped {
Assert.Throws<FormatException>(() => builder.AppendFormat("{0:{}", new string[10])); // Format with custom format contains unescaped {
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void AppendFormat_NoEscapedBracesInCustomFormatSpecifier()
{
// Tests new rule which does not allow escaped braces in the custom format specifier
var builder = new StringBuilder();
builder.AppendFormat("{0:}}}", 0);

// Previous behavior: first two closing braces would be escaped and passed in as the custom format specifier, thus result = "}"
// New behavior: first closing brace closes the argument hole and next two are escaped as part of the format, thus result = "0}"
Assert.Equal("0}", builder.ToString());
// Previously this would be allowed and escaped brace would be passed into the custom format, now this is unsupported
Assert.Throws<FormatException>(() => builder.AppendFormat("{0:{{}", 0)); // Format with custom format contains {
}

[Fact]
Expand Down