http://bugzilla.novell.com/show_bug.cgi?id=573691
http://bugzilla.novell.com/show_bug.cgi?id=573691#c0 Summary: DataContractJsonSerializer bug with floating point special values Classification: Mono Product: Mono: Class Libraries Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: WCF AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Test cases (already in SVN). object ReadWriteObject (Type type, object obj, string expected) { using (MemoryStream ms = new MemoryStream ()) { DataContractJsonSerializer dcjs = new DataContractJsonSerializer (type); dcjs.WriteObject (ms, obj); ms.Position = 0; using (StreamReader sr = new StreamReader (ms)) { Assert.AreEqual (expected, sr.ReadToEnd (), "WriteObject"); ms.Position = 0; return dcjs.ReadObject (ms); } } } [Test] [Category ("NotWorking")] public void ReadWriteObject_Single_SpecialCases () { Assert.IsTrue (Single.IsNaN ((float) ReadWriteObject (typeof (float), Single.NaN, "NaN"))); Assert.IsTrue (Single.IsNegativeInfinity ((float) ReadWriteObject (typeof (float), Single.NegativeInfinity, "-INF"))); Assert.IsTrue (Single.IsPositiveInfinity ((float) ReadWriteObject (typeof (float), Single.PositiveInfinity, "INF"))); } [Test] [Category ("NotWorking")] public void ReadWriteObject_Double_SpecialCases () { Assert.IsTrue (Double.IsNaN ((double) ReadWriteObject (typeof (double), Double.NaN, "NaN"))); Assert.IsTrue (Double.IsNegativeInfinity ((double) ReadWriteObject (typeof (double), Double.NegativeInfinity, "-INF"))); Assert.IsTrue (Double.IsPositiveInfinity ((double) ReadWriteObject (typeof (double), Double.PositiveInfinity, "INF"))); } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
