aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-02-08 11:01:50 +0100
committerAndreas Färber <afaerber@suse.de>2014-02-14 21:12:03 +0100
commit0b7593e085e66c7f5ab980a1ed8ee683c36b7347 (patch)
treef883f5fc027994008c1e5a214d5b36100c7ad1ee /tests
parent98a6528461acf7a6f321d846e6f4e77e87305965 (diff)
qapi: Add human mode to StringOutputVisitor
This will be used by "info qtree". For numbers it prints both the decimal and hex values. For sizes it rounds to the nearest power of 2^10. For strings, it puts quotes around the string and separates NULL and empty string. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-string-output-visitor.c2
-rw-r--r--tests/test-visitor-serialization.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c
index 79d815f888..56cc21d078 100644
--- a/tests/test-string-output-visitor.c
+++ b/tests/test-string-output-visitor.c
@@ -26,7 +26,7 @@ typedef struct TestOutputVisitorData {
static void visitor_output_setup(TestOutputVisitorData *data,
const void *unused)
{
- data->sov = string_output_visitor_new();
+ data->sov = string_output_visitor_new(false);
g_assert(data->sov != NULL);
data->ov = string_output_get_visitor(data->sov);
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c
index 9aaa5872e5..6bff950eb6 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/test-visitor-serialization.c
@@ -1083,7 +1083,7 @@ static void string_serialize(void *native_in, void **datap,
{
StringSerializeData *d = g_malloc0(sizeof(*d));
- d->sov = string_output_visitor_new();
+ d->sov = string_output_visitor_new(false);
visit(string_output_get_visitor(d->sov), &native_in, errp);
*datap = d;
}