summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Onderka <gsvick@gmail.com>2018-10-25 18:21:41 +0200
committerJan Kotas <jkotas@microsoft.com>2018-10-25 09:21:41 -0700
commit2e84928f84debcca03226e613fc84668c18bd261 (patch)
treecd44ed64eb0aa8b77cb67391e16b3852e6198824
parentf7863cf3877a1ce17bde80b8e78ed5b9ba2cf8f5 (diff)
downloadcoreclr-2e84928f84debcca03226e613fc84668c18bd261.tar.gz
coreclr-2e84928f84debcca03226e613fc84668c18bd261.tar.bz2
coreclr-2e84928f84debcca03226e613fc84668c18bd261.zip
Avoid comparing capacity in StringBuilder.Equals (#20567)
* Avoid comparing capacity in StringBuilder.Equals * Disabled corefx StringBuilder test
-rw-r--r--src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs2
-rw-r--r--tests/CoreFX/CoreFX.issues.json14
2 files changed, 15 insertions, 1 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs b/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs
index 99021e2dda..2e1b067662 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 e973d5b56c..b038176e53 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."
+ }
+ ]
+ }
}
]