X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-json.c;h=24bc745354138cacd349f1bc60fd41cb94c5eb48;hb=d978fa4832bbc5176e05edd05bcdf2452a8dded2;hp=c7c01c8e874ef7051b2c6dab665af45a52206ef7;hpb=8706009e555bb9fa04a5679e4be2c7c67506802b;p=sliver-openvswitch.git diff --git a/tests/test-json.c b/tests/test-json.c index c7c01c8e8..24bc74535 100644 --- a/tests/test-json.c +++ b/tests/test-json.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010 Nicira, Inc. + * Copyright (c) 2009, 2010, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ print_and_free_json(struct json *json) ok = false; } else { char *s = json_to_string(json, JSSF_SORT | (pretty ? JSSF_PRETTY : 0)); + ovs_assert(pretty || json_serialized_length(json) == strlen(s)); puts(s); free(s); ok = true;