From 2e84928f84debcca03226e613fc84668c18bd261 Mon Sep 17 00:00:00 2001 From: Petr Onderka Date: Thu, 25 Oct 2018 18:21:41 +0200 Subject: [PATCH] Avoid comparing capacity in StringBuilder.Equals (#20567) * Avoid comparing capacity in StringBuilder.Equals * Disabled corefx StringBuilder test --- .../shared/System/Text/StringBuilder.cs | 2 +- tests/CoreFX/CoreFX.issues.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs b/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs index 99021e2..2e1b067 100644 --- a/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs +++ b/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs @@ -1777,7 +1777,7 @@ namespace System.Text { if (sb == null) return false; - if (Capacity != sb.Capacity || MaxCapacity != sb.MaxCapacity || Length != sb.Length) + if (Length != sb.Length) return false; if (sb == this) return true; diff --git a/tests/CoreFX/CoreFX.issues.json b/tests/CoreFX/CoreFX.issues.json index e973d5b..b038176 100644 --- a/tests/CoreFX/CoreFX.issues.json +++ b/tests/CoreFX/CoreFX.issues.json @@ -579,5 +579,19 @@ ], "methods": null } + }, + { + "name": "System.Runtime.Tests", + "enabled": true, + "exclusions": { + "namespaces": null, + "classes": null, + "methods": [ + { + "name": "System.Text.Tests.StringBuilderTests.Equals", + "reason": "Because of a change in StringBuilder, this test is outdated." + } + ] + } } ] -- 2.7.4