fix clang-format (#1049)

fix clang-format for #1039
This commit is contained in:
dota17 2019-10-14 09:42:47 +08:00 committed by GitHub
parent 2e33c218cb
commit 7329223f58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2083,8 +2083,7 @@ JSONTEST_FIXTURE(StyledWriterTest, writeValueWithComment) {
{
const Json::String expected("\n//commentBeforeValue\n\"hello\"\n");
Json::Value root = "hello";
root.setComment(Json::String("//commentBeforeValue"),
Json::commentBefore);
root.setComment(Json::String("//commentBeforeValue"), Json::commentBefore);
const Json::String result = writer.write(root);
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
}
@ -2099,8 +2098,7 @@ JSONTEST_FIXTURE(StyledWriterTest, writeValueWithComment) {
{
const Json::String expected("\"hello\"\n//commentAfter\n\n");
Json::Value root = "hello";
root.setComment(Json::String("//commentAfter"),
Json::commentAfter);
root.setComment(Json::String("//commentAfter"), Json::commentAfter);
const Json::String result = writer.write(root);
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
}
@ -2177,9 +2175,7 @@ JSONTEST_FIXTURE(StyledStreamWriterTest, multiLineArray) {
Json::StyledStreamWriter writer;
{
// Array member has more than 20 print effect rendering lines
const Json::String expected(
"["
"\n\t0,"
const Json::String expected("[\n\t0,"
"\n\t1,"
"\n\t2,"
"\n\t3,"
@ -2228,8 +2224,7 @@ JSONTEST_FIXTURE(StyledStreamWriterTest, writeValueWithComment) {
const Json::String expected("//commentBeforeValue\n\"hello\"\n");
Json::Value root = "hello";
Json::OStringStream sout;
root.setComment(Json::String("//commentBeforeValue"),
Json::commentBefore);
root.setComment(Json::String("//commentBeforeValue"), Json::commentBefore);
writer.write(sout, root);
const Json::String result = sout.str();
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
@ -2248,8 +2243,7 @@ JSONTEST_FIXTURE(StyledStreamWriterTest, writeValueWithComment) {
const Json::String expected("\"hello\"\n//commentAfter\n");
Json::Value root = "hello";
Json::OStringStream sout;
root.setComment(Json::String("//commentAfter"),
Json::commentAfter);
root.setComment(Json::String("//commentAfter"), Json::commentAfter);
writer.write(sout, root);
const Json::String result = sout.str();
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
@ -2328,8 +2322,7 @@ JSONTEST_FIXTURE(StreamWriterTest, multiLineArray) {
// When wb.settings_["commentStyle"] = "None", the effect of
// printing multiple lines will be displayed when there are
// more than 20 array members.
const Json::String expected(
"[\n\t0,"
const Json::String expected("[\n\t0,"
"\n\t1,"
"\n\t2,"
"\n\t3,"
@ -2357,7 +2350,7 @@ JSONTEST_FIXTURE(StreamWriterTest, multiLineArray) {
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
}
{
//Array members do not exceed 21 print effects to render a single line
// Array members do not exceed 21 print effects to render a single line
const Json::String expected("[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]");
Json::Value root;
for (int i = 0; i < 10; i++)
@ -3169,7 +3162,8 @@ int main(int argc, const char* argv[]) {
JSONTEST_REGISTER_FIXTURE(runner, StyledStreamWriterTest, writeArrays);
JSONTEST_REGISTER_FIXTURE(runner, StyledStreamWriterTest, writeNestedObjects);
JSONTEST_REGISTER_FIXTURE(runner, StyledStreamWriterTest, multiLineArray);
JSONTEST_REGISTER_FIXTURE(runner, StyledStreamWriterTest, writeValueWithComment);
JSONTEST_REGISTER_FIXTURE(runner, StyledStreamWriterTest,
writeValueWithComment);
JSONTEST_REGISTER_FIXTURE(runner, StreamWriterTest, writeNumericValue);
JSONTEST_REGISTER_FIXTURE(runner, StreamWriterTest, writeArrays);
JSONTEST_REGISTER_FIXTURE(runner, StreamWriterTest, writeNestedObjects);