added automatic unit tests (using travis) #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Although it might seem unnecessary for such a small project, I have found automatic testing to be helpful for my work. If you accept this pull request, then every time you push a commit to github, travis-ci.org will start a virtual machine which will 1) compile lambda_lanczos_test and 2) run it (using two different compilers: g++ and clang++). If the code fails to compile, or if any of the "assert" statements in lambda_lanczos_test.cpp fail, then travis will send you a warning by email. I also added some "badges" to the README.md file, so that any of your tests (in the master branch) fail, everyone else will know also (!).
To make this work, you will have to visit https://travis-ci.org. (I think you can log in using your github password.) You will see a list of the repositories you have on github. Select "lambda-lanczos", and click on the "Activate" button in the middle of the screen. Then to test whether everything is working create a new commit. If everything is working, you will see a green rectangle at the top of your README.md file. (See example below). I tested it on my fork of your repository and it was working. However you will have to make sure your account is setup with travis-ci.org first.
You may want to add more assert statements to lambda_lanczos_test.cpp. (I was not very rigorous.)
You don't have to accept this pull request. But I thought I would show you how to add automatic testing to a github repository because it was so helpful for me. (I just learned how to do it recently.)
Thank you again very much for your help.
-Andrew