Skip to content
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

Trim whitespace when parsing table metadata. #2799

Merged
merged 3 commits into from
Jun 11, 2020

Conversation

chrisdembia
Copy link
Member

@chrisdembia chrisdembia commented Jun 11, 2020

Fixes part of opensim-org/opensim-moco#616

Brief summary of changes

  • Whitespace is trimmed when parsing metadata with DelimFileAdapter.
  • testSTOFileAdapter now uses the Catch testing framework.
  • The test for testSTOFileAdapter is now more lenient: whitespace is trimmed before checking if headers are equivalent.

Testing I've completed

Updated and ran testSTOFileAdapter.

CHANGELOG.md (choose one)

  • updated.

The Doxygen for this PR can be viewed at http://myosin.sourceforge.net/?C=N;O=D; click the folder whose name is this PR's number.


This change is Reviewable

@chrisdembia chrisdembia requested a review from aymanhab June 11, 2020 02:06
Copy link
Member

@tkuchida tkuchida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM. One minor comment.

std::remove(emptyFileName.c_str());
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a try/catch block here so the file gets deleted even if the SimTK_TEST_MUST_THROW_EXC() fails?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a FileRemover class to handle this issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 😎

Copy link
Member

@aymanhab aymanhab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@aymanhab aymanhab merged commit 9653c46 into master Jun 11, 2020
@chrisdembia chrisdembia deleted the fix_metadata_trailing_whitespace branch June 11, 2020 17:42
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.

3 participants