]> git.proxmox.com Git - mirror_qemu.git/commit - tests/test-visitor-serialization.c
qapi: fix visitor serialization tests for numbers/doubles
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 10 May 2013 22:46:07 +0000 (17:46 -0500)
committerLuiz Capitulino <lcapitulino@redhat.com>
Thu, 23 May 2013 13:44:21 +0000 (09:44 -0400)
commit089f26bb735fb414b79f5fa3753910d5339d2a1d
treee7ce56d929f7505be1dcb744a3c863be1943dd09
parente92cfa0d90c618ff1f131c60ef1b27aa6fe69a0a
qapi: fix visitor serialization tests for numbers/doubles

We never actually stored the stringified double values into the strings
before we did the comparisons. This left number/double values completely
uncovered in test-visitor-serialization tests.

Fixing this exposed a bug in our handling of large whole number values
in QEMU's JSON parser which is now fixed.

Simplify the code while we're at it by dropping the
calc_float_string_storage() craziness in favor of GStrings.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Amos Kong <akong@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
tests/test-visitor-serialization.c