Skip to content

Removed unneeded newlines from parsed comments #52

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

Merged
merged 2 commits into from
Oct 11, 2014

Conversation

cquammen
Copy link
Contributor

@cquammen cquammen commented Oct 8, 2014

Newlines from comments separated by lines are retained when comments
are appended, so adding a newline between separate comments for a
node is not needed.

@cdunn2001
Copy link
Contributor

Please add a test which fails before this change and passes after. Then we will merge this.

@cquammen
Copy link
Contributor Author

cquammen commented Oct 8, 2014

Gladly. Is there anything in the testing infrastructure to compare the *.rewrite files with an expected file? Or to write comments to the *.actual files?

@cdunn2001
Copy link
Contributor

Hmm. I don't know. I haven't done much work on the json-commenting code.

This enables testing of comment-handling code. Updated *.expected test
result files to account for printing of comments.
Newlines from comments separated by lines are retained when comments
are appended, so adding a newline between separate comments for a
node is not needed.
@cquammen
Copy link
Contributor Author

cquammen commented Oct 9, 2014

Okay, I modified the test runner jsoncpp/src/jsontestrunner/main.cpp to print comments to the *.actual files and updated the *.expected files accordingly. This causes some of the tests with multi-line comments to fail because of the unexpected extra newlines. The failures are corrected by the second commit fd06bfc which removes the extra newlines from comments.

cdunn2001 added a commit that referenced this pull request Oct 11, 2014
Removed unneeded newlines from parsed comments
@cdunn2001 cdunn2001 merged commit bc8b5d8 into open-source-parsers:master Oct 11, 2014
@cdunn2001
Copy link
Contributor

Might revert if anyone complains, but looks good to me. Thanks.

@cquammen
Copy link
Contributor Author

Great, thanks!

kwrobot pushed a commit to Kitware/VTK that referenced this pull request Oct 14, 2014
Merged in upstream jsoncpp in pull request

open-source-parsers/jsoncpp#52

Change-Id: Iae13e992765362399b23294b153c3ae1424704c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants