Browse Source

2005-01-21 Ben Maurer <[email protected]>

	* StringBuilderTest.cs (CapacityFromString): This relies on impl
	specific behavior. Rewrite the test.


svn path=/trunk/mcs/; revision=39338
Ben Maurer 21 years ago
parent
commit
6569a214bb

+ 5 - 0
mcs/class/corlib/Test/System.Text/ChangeLog

@@ -1,3 +1,8 @@
+2005-01-21  Ben Maurer  <[email protected]>
+
+	* StringBuilderTest.cs (CapacityFromString): This relies on impl
+	specific behavior. Rewrite the test.
+
 2005-01-11 Gonzalo Paniagua Javier <[email protected]>
 
 	* System.Text/StringBuilderTest.cs: new tests for capacity when the

+ 2 - 5
mcs/class/corlib/Test/System.Text/StringBuilderTest.cs

@@ -446,11 +446,8 @@ namespace MonoTests.System.Text {
 	[Test]
 	public void CapacityFromString ()
 	{
-		StringBuilder sb = new StringBuilder ("hola");
-		AssertEquals ("#01", 16, sb.Capacity);
-
-		sb = new StringBuilder ("01234567890123456789");
-		AssertEquals ("#02", 32, sb.Capacity);
+		StringBuilder sb = new StringBuilder ("hola").Append ("lala");
+		AssertEquals ("#01", "holalala", sb.ToString ());
 	}
 }