Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2007-01-09 Robert Jordan <robertj@gmx.net>

	* cross-domain.cs: Reflect marshal.c changes: after r70643
	StringBuilders are not ReferenceEquals () anymore, because
	they are marshaled by value.


svn path=/trunk/mono/; revision=70741
  • Loading branch information...
commit ddf0470d91fed260419c4b4da8f109dea1822791 1 parent b8f335d
@robert-j robert-j authored
Showing with 15 additions and 3 deletions.
  1. +6 −0 mono/tests/ChangeLog
  2. +9 −3 mono/tests/cross-domain.cs
View
6 mono/tests/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-09 Robert Jordan <robertj@gmx.net>
+
+ * cross-domain.cs: Reflect marshal.c changes: after r70643
+ StringBuilders are not ReferenceEquals () anymore, because
+ they are marshaled by value.
+
2007-01-01 Miguel de Icaza <miguel@novell.com>
* libtest.c, marshal5.cs: Add tests for ByValTStr marshalling when
View
12 mono/tests/cross-domain.cs
@@ -64,7 +64,7 @@ public int RunTest ()
StringBuilder sb = new StringBuilder ("un");
server.Run9 (sb);
- Test.CheckValue (sb, new StringBuilder ("un-dos"), 190);
+ Test.CheckValue (sb, new StringBuilder ("un"), 190);
}
catch (TestException ex)
@@ -100,8 +100,14 @@ public static void CheckValue (object ob1, object ob2, int ec)
throw new TestException ("Wrong type (maybe wrong domain?)", ec);
if (ob1 is StringBuilder) {
- if (!((StringBuilder)ob1).Equals ((StringBuilder)ob2))
- throw new TestException ("Objects are not equal", ec);
+ if (Object.ReferenceEquals (ob1, ob2))
+ throw new TestException ("StringBuilders are ReferenceEquals", ec);
+
+ StringBuilder sb1 = (StringBuilder) ob1;
+ StringBuilder sb2 = (StringBuilder) ob2;
+
+ if (sb1.ToString () != sb2.ToString ())
+ throw new TestException ("Strings are not equal", ec);
}
else if (!ob1.Equals (ob2))
throw new TestException ("Objects are not equal", ec);
Please sign in to comment.
Something went wrong with that request. Please try again.