}
@Test
public void SerializeReal() throws IOException, OSDException
{
OSD llsdOne = OSD.FromReal(12987234.723847d);
String sOne = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdOne);
OSD llsdOneDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sOne);
Assert.assertEquals(OSDType.Real, llsdOneDS.getType());
Assert.assertEquals(12987234.723847d, llsdOneDS.asReal(), 0);
OSD llsdTwo = OSD.FromReal(-32347892.234234d);
String sTwo = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdTwo);
OSD llsdTwoDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
Assert.assertEquals(OSDType.Real, llsdTwoDS.getType());
Assert.assertEquals(-32347892.234234d, llsdTwoDS.asReal(), 0);
OSD llsdThree = OSD.FromReal( Double.MAX_VALUE );
String sThree = NotationalLLSDOSDParser.SerializeLLSDNotation( llsdThree );
OSD llsdThreeDS = NotationalLLSDOSDParser.DeserializeLLSDNotation( sThree );
Assert.assertEquals( OSDType.Real, llsdThreeDS.getType() );
Assert.assertEquals( Double.MAX_VALUE, llsdThreeDS.asReal(), 0);
OSD llsdFour = OSD.FromReal(Double.MIN_VALUE);
String sFour = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdFour);
OSD llsdFourDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFour);
Assert.assertEquals(OSDType.Real, llsdFourDS.getType());
Assert.assertEquals(Double.MIN_VALUE, llsdFourDS.asReal(), 0);
OSD llsdFive = OSD.FromReal(-1.1123123E+50d);
String sFive = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdFive);
OSD llsdFiveDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFive);
Assert.assertEquals(OSDType.Real, llsdFiveDS.getType());
Assert.assertEquals(-1.1123123E+50d, llsdFiveDS.asReal(), 0);
OSD llsdSix = OSD.FromReal(2.0193899999999998204e-06);
String sSix = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdSix);
OSD llsdSixDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sSix);
Assert.assertEquals(OSDType.Real, llsdSixDS.getType());
Assert.assertEquals(2.0193899999999998204e-06, llsdSixDS.asReal(), 0);
}