-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Update to python3 #1084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to python3 #1084
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -350,7 +350,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrayInsertAtRandomIndex) { | |
JSONTEST_ASSERT_EQUAL(Json::Value("index1"), array[2]); | ||
JSONTEST_ASSERT_EQUAL(Json::Value("index2"), array[3]); | ||
// checking address | ||
for (int i = 0; i < 3; i++) { | ||
for (Json::ArrayIndex i = 0; i < 3; i++) { | ||
JSONTEST_ASSERT_EQUAL(vec[i], &array[i]); | ||
} | ||
vec.push_back(&array[3]); | ||
|
@@ -362,7 +362,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrayInsertAtRandomIndex) { | |
JSONTEST_ASSERT_EQUAL(Json::Value("index1"), array[3]); | ||
JSONTEST_ASSERT_EQUAL(Json::Value("index2"), array[4]); | ||
// checking address | ||
for (int i = 0; i < 4; i++) { | ||
for (Json::ArrayIndex i = 0; i < 4; i++) { | ||
JSONTEST_ASSERT_EQUAL(vec[i], &array[i]); | ||
} | ||
vec.push_back(&array[4]); | ||
|
@@ -376,7 +376,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrayInsertAtRandomIndex) { | |
JSONTEST_ASSERT_EQUAL(Json::Value("index2"), array[4]); | ||
JSONTEST_ASSERT_EQUAL(Json::Value("index5"), array[5]); | ||
// checking address | ||
for (int i = 0; i < 5; i++) { | ||
for (Json::ArrayIndex i = 0; i < 5; i++) { | ||
JSONTEST_ASSERT_EQUAL(vec[i], &array[i]); | ||
} | ||
vec.push_back(&array[5]); | ||
|
@@ -2234,7 +2234,6 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, writeNestedObjects) { | |
} | ||
|
||
JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) { | ||
Json::StyledStreamWriter writer; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line 2237 shadows line 2261 below, but is not used unit line 2270. |
||
{ | ||
// Array member has more than 20 print effect rendering lines | ||
const Json::String expected("[\n\t0," | ||
|
@@ -2268,6 +2267,7 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) { | |
JSONTEST_ASSERT_STRING_EQUAL(expected, result); | ||
} | ||
{ | ||
Json::StyledStreamWriter writer; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really understand how adding a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the original code the line 2237 shadows line 2261 below it, but is not used unit line 2270. Scope the variable called "writer" in the blocks that need them. It may also have been OK to remove line 2261 in the original code, but I was not sure what the intent of making a new write was. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I forgot to remove line 2261 when i wrote this testcase. |
||
// 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 ]\n"); | ||
Json::Value root; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, but I'm kind of curious why this error just started happening. Any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New apple clang compiler with Mac 10.15, XCode 11.2 refused to compile the previous code due to ambiguities.