Skip to content

Commit faf7eac

Browse files
author
MarcoFalke
committed
test: clang-format -i src/univalue/test/unitester.cpp
1 parent fafa9cc commit faf7eac

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/univalue/test/unitester.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,32 +68,32 @@
6868

6969
static std::string rtrim(std::string s)
7070
{
71-
s.erase(s.find_last_not_of(" \n\r\t")+1);
71+
s.erase(s.find_last_not_of(" \n\r\t") + 1);
7272
return s;
7373
}
7474

7575
static void runtest(std::string filename, const std::string& jdata)
7676
{
77-
std::string prefix = filename.substr(0, 4);
77+
std::string prefix = filename.substr(0, 4);
7878

79-
bool wantPass = (prefix == "pass") || (prefix == "roun");
80-
bool wantFail = (prefix == "fail");
81-
bool wantRoundTrip = (prefix == "roun");
82-
assert(wantPass || wantFail);
79+
bool wantPass = (prefix == "pass") || (prefix == "roun");
80+
bool wantFail = (prefix == "fail");
81+
bool wantRoundTrip = (prefix == "roun");
82+
assert(wantPass || wantFail);
8383

84-
UniValue val;
85-
bool testResult = val.read(jdata);
84+
UniValue val;
85+
bool testResult = val.read(jdata);
8686

87-
if (wantPass) {
88-
assert(testResult == true);
89-
} else {
90-
assert(testResult == false);
91-
}
87+
if (wantPass) {
88+
assert(testResult == true);
89+
} else {
90+
assert(testResult == false);
91+
}
9292

93-
if (wantRoundTrip) {
94-
std::string odata = val.write(0, 0);
95-
assert(odata == rtrim(jdata));
96-
}
93+
if (wantRoundTrip) {
94+
std::string odata = val.write(0, 0);
95+
assert(odata == rtrim(jdata));
96+
}
9797
}
9898

9999
#define TEST_FILE(name) {#name, json_tests::name}
@@ -185,7 +185,7 @@ void no_nul_test()
185185
assert(val.read({buf + 3, 7}));
186186
}
187187

188-
int main (int argc, char *argv[])
188+
int main(int argc, char* argv[])
189189
{
190190
for (const auto& [file, json] : tests) {
191191
runtest(std::string{file}, std::string{json});

0 commit comments

Comments
 (0)