VictorySquare/UnityLitJson — pull request #1 by yoyobbi (2014-05-17 06:38:43+00:00)
Title: Additional round-trip unit testing for numeric types, and some fixes to match.

Added new JsonRoundTripTest.cs, which converts numbers to json, then back again, then checks to see that we got what we started with. Do this for 8/16/32/64-bit signed and unsigned integers and float/double/decimal. Test 0, 1, Min, Max, and (for reals) epsilon.

This uncovered some issues with too-big numbers not getting handled correctly (ulong and decimal-formatted-as-integer), which have mostly been addressed.

Still need to see if comparison methods can be removed in favour of a strict equality test and true loss-less round-tripping. In principle this is what decimal is for, so it's a pity it's not currently supported correctly (we always go through a double to parse a decimal, which introduces loss of precision).

A better approach would probably be to get rid of JsonReader.ProcessNumber, and only do the string parsing when the target type is known.

Also note new Visual Studio solution and project files, located in the build folder (where they belong ;-). Also note that I'm not presently compiling the Unity files -- these ought to be in a separate folder and assembly.

Any questions fire away -- you can either merge this request or we can just talk about it for a bit.

cheers,
yggy