qemu/tests
Michael Roth 173bbb754f qapi: String visitor, use %f representation for floats
Currently string-output-visitor formats floats as %g, which is nice in
that trailing 0's are automatically truncated, but otherwise this causes
some issues:

 - it uses 6 significant figures instead of 6 decimal places, which
   means something like 155777.5 (which even has an exact floating point
   representation) will be rounded to 155778 when converted to a string.

 - output will be presented in scientific notation when the normalized
   form requires a 10^x multiplier. Not a huge deal, but arguably less
   readable for command-line arguments.

 - due to using scientific notation for numbers requiring more than 6
   significant figures, instead of hard-defined decimal places, it
   fails a lot of the test-visitor-serialization unit tests for floats.

Instead, let's just use %f, which is what the QJSON and the QMP visitors
use.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-08 16:11:14 +02:00
..
qemu-iotests qemu-iotests: mark 035 qcow2-only 2012-05-25 18:13:44 +02:00
tcg fix some common typos 2012-05-14 07:27:24 +02:00
.gitignore Add .gitignore for tests/ 2012-04-20 13:23:27 +01:00
check-block.sh Add 'make check-block' 2012-03-12 15:14:07 +01:00
check-qdict.c test makefile overhaul 2012-03-30 08:14:11 -05:00
check-qfloat.c test makefile overhaul 2012-03-30 08:14:11 -05:00
check-qint.c test makefile overhaul 2012-03-30 08:14:11 -05:00
check-qjson.c test makefile overhaul 2012-03-30 08:14:11 -05:00
check-qlist.c test makefile overhaul 2012-03-30 08:14:11 -05:00
check-qstring.c test makefile overhaul 2012-03-30 08:14:11 -05:00
fdc-test.c fdc-test: introduced qtest no_media_on_start and cmos qtest for floppy 2012-05-25 18:23:47 +02:00
libqtest.c qtest: Add function to send QMP commands 2012-05-10 10:32:11 +02:00
libqtest.h qtest: Add function to send QMP commands 2012-05-10 10:32:11 +02:00
m48t59-test.c qtest: add m48t59 tests for Sparc 2012-04-21 07:10:25 +00:00
Makefile qapi: Unit tests for visitor-based serialization 2012-06-08 16:11:14 +02:00
qemu-iotests-quick.sh make check: Add qemu-iotests subset 2012-03-12 15:14:07 +01:00
rtc-test.c qtest: add register fuzzing to RTC test 2012-04-19 18:14:55 +00:00
test-coroutine.c test makefile overhaul 2012-03-30 08:14:11 -05:00
test-qmp-commands.c test makefile overhaul 2012-03-30 08:14:11 -05:00
test-qmp-input-strict.c test makefile overhaul 2012-03-30 08:14:11 -05:00
test-qmp-input-visitor.c test makefile overhaul 2012-03-30 08:14:11 -05:00
test-qmp-output-visitor.c test makefile overhaul 2012-03-30 08:14:11 -05:00
test-string-input-visitor.c test makefile overhaul 2012-03-30 08:14:11 -05:00
test-string-output-visitor.c qapi: String visitor, use %f representation for floats 2012-06-08 16:11:14 +02:00
test-visitor-serialization.c qapi: Unit tests for visitor-based serialization 2012-06-08 16:11:14 +02:00