X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Fcross-domain.cs;h=0db2f5bb3cd31e819816596436d0066631195fa0;hb=95405ddfdf12ac4a6fc71845d931599a9fad2c1f;hp=9632676d518c7e3f09e9275b12fd4ba05264bb22;hpb=a097b5471761180c4aae2dab224ed9caeeae3e86;p=mono.git diff --git a/mono/tests/cross-domain.cs b/mono/tests/cross-domain.cs index 9632676d518..0db2f5bb3cd 100644 --- a/mono/tests/cross-domain.cs +++ b/mono/tests/cross-domain.cs @@ -64,7 +64,7 @@ public class Test: MarshalByRefObject 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 class Test: MarshalByRefObject 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);