From faf7eac364fb7f421a649b483286ac8681d92b31 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 20 Dec 2024 15:02:05 +0100 Subject: [PATCH] test: clang-format -i src/univalue/test/unitester.cpp --- src/univalue/test/unitester.cpp | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/univalue/test/unitester.cpp b/src/univalue/test/unitester.cpp index 453dc0508a..e517e64188 100644 --- a/src/univalue/test/unitester.cpp +++ b/src/univalue/test/unitester.cpp @@ -68,32 +68,32 @@ static std::string rtrim(std::string s) { - s.erase(s.find_last_not_of(" \n\r\t")+1); + s.erase(s.find_last_not_of(" \n\r\t") + 1); return s; } static void runtest(std::string filename, const std::string& jdata) { - std::string prefix = filename.substr(0, 4); + std::string prefix = filename.substr(0, 4); - bool wantPass = (prefix == "pass") || (prefix == "roun"); - bool wantFail = (prefix == "fail"); - bool wantRoundTrip = (prefix == "roun"); - assert(wantPass || wantFail); + bool wantPass = (prefix == "pass") || (prefix == "roun"); + bool wantFail = (prefix == "fail"); + bool wantRoundTrip = (prefix == "roun"); + assert(wantPass || wantFail); - UniValue val; - bool testResult = val.read(jdata); + UniValue val; + bool testResult = val.read(jdata); - if (wantPass) { - assert(testResult == true); - } else { - assert(testResult == false); - } + if (wantPass) { + assert(testResult == true); + } else { + assert(testResult == false); + } - if (wantRoundTrip) { - std::string odata = val.write(0, 0); - assert(odata == rtrim(jdata)); - } + if (wantRoundTrip) { + std::string odata = val.write(0, 0); + assert(odata == rtrim(jdata)); + } } #define TEST_FILE(name) {#name, json_tests::name} @@ -185,7 +185,7 @@ void no_nul_test() assert(val.read({buf + 3, 7})); } -int main (int argc, char *argv[]) +int main(int argc, char* argv[]) { for (const auto& [file, json] : tests) { runtest(std::string{file}, std::string{json});