mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-26 09:44:57 +02:00
unindent test-code
This commit is contained in:
parent
2160c9a042
commit
942e2c999a
@ -257,19 +257,21 @@ int main(int argc, const char* argv[]) {
|
|||||||
Json::Value root;
|
Json::Value root;
|
||||||
exitCode = parseAndSaveValueTree(
|
exitCode = parseAndSaveValueTree(
|
||||||
input, actualPath, "input", root, features, parseOnly);
|
input, actualPath, "input", root, features, parseOnly);
|
||||||
if (exitCode == 0 && !parseOnly) {
|
if (exitCode != 0 || parseOnly) {
|
||||||
std::string rewrite;
|
return exitCode;
|
||||||
exitCode = rewriteValueTree(rewritePath, root, rewrite);
|
|
||||||
if (exitCode == 0) {
|
|
||||||
Json::Value rewriteRoot;
|
|
||||||
exitCode = parseAndSaveValueTree(rewrite,
|
|
||||||
rewriteActualPath,
|
|
||||||
"rewrite",
|
|
||||||
rewriteRoot,
|
|
||||||
features,
|
|
||||||
parseOnly);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
std::string rewrite;
|
||||||
|
exitCode = rewriteValueTree(rewritePath, root, rewrite);
|
||||||
|
if (exitCode =! 0) {
|
||||||
|
return exitCode;
|
||||||
|
}
|
||||||
|
Json::Value rewriteRoot;
|
||||||
|
exitCode = parseAndSaveValueTree(rewrite,
|
||||||
|
rewriteActualPath,
|
||||||
|
"rewrite",
|
||||||
|
rewriteRoot,
|
||||||
|
features,
|
||||||
|
parseOnly);
|
||||||
}
|
}
|
||||||
catch (const std::exception& e) {
|
catch (const std::exception& e) {
|
||||||
printf("Unhandled exception:\n%s\n", e.what());
|
printf("Unhandled exception:\n%s\n", e.what());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user