Skip to content

Some unit tests updates #73

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Mar 3, 2015
Merged

Some unit tests updates #73

merged 4 commits into from
Mar 3, 2015

Conversation

jacobwilliams
Copy link
Owner

No description provided.

@jacobwilliams
Copy link
Owner Author

Now why did the new unit test fail with the cmake build? Did I mess something up?

@zbeekman
Copy link
Contributor

zbeekman commented Mar 3, 2015

I suspect it’s due to the new files needed for the tests… right now test inputs from the files/directory are manually enumerated in CMakeLists.txt to be copied into the appropriate location in the out-of-source CMake build—I did this because some tests overwrite files. I didn’t want one test to fail because another overwrote the files it read in and messed something up, and also I wanted to have the ability to use diff to do some regression testing. Originally only test1.json and test5.json were read in by tests. Then invalid.json and invalid2.json were added. Lines 164 - 167 ofCMakeLists.txt is where the copy takes place from the source tree to the build tree.

I’m wondering if we should have a convention to distinguish test inputs from test outputs. That way we can use file globbing to vacuum up the appropriate input files and make sure they’re copied to the build tree. At the same time if we had a convention for the test outputs, we could also automatically send them through jsonlint and compare the actual output with the anticipated output. What do you think of this idea?

@zbeekman
Copy link
Contributor

zbeekman commented Mar 3, 2015

If you like I may be able to find time to work up a PR against your unit-tests branch to implement some of this.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.88% when pulling b14f1ab on unit-tests into fde8d7d on master.

jacobwilliams added a commit that referenced this pull request Mar 3, 2015
@jacobwilliams jacobwilliams merged commit ab3e8fa into master Mar 3, 2015
@jacobwilliams jacobwilliams deleted the unit-tests branch March 3, 2015 17:05
@zbeekman zbeekman mentioned this pull request Mar 3, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants