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
Added tests for NumberParser #296
Conversation
@Test | ||
public void testLongParseSuccess() { | ||
Long num = NumberParser.parseLong("1"); | ||
assertTrue(num == 1L); |
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.
Would assertEquals
work? Same for other tests.
Hi Rohan! Thank you for the contribution. Looks good! I left some comments. They might be a bit nitpicky, but since you're going to continue with this kind of pull requests, I think it's good to do everything properly from the start. |
Thanks for the review @mishako ! Really appreciate it. I'll make the On Fri, Apr 22, 2016, 3:07 PM mishako notifications@github.com wrote:
|
@mishako I've made the suggested changes. I'd appreciate you taking a quick look! |
@rchakra3 You've included commits from master in your branch. |
457c665
to
45c615d
Compare
@mishako Sorry I've fixed that! |
@rchakra3 Nice! Do you want to squash commits into one before we merge it? |
45c615d
to
2b3fd79
Compare
@mishako Done! :) |
@rchakra3 Ah, sorry, I missed more things:
|
e439179
to
6c7032c
Compare
@mishako I've made the changes. Do the messages look fine? |
@rchakra3 The messages look fine, but they are pretty much what assertEquals has by default, so do you really need them? |
@mishako That's true. I assumed you expected a custom message as per your second point above: Did I misunderstand you? |
@rchakra3 No, it's me, sorry. You were correctly using delta as the third argument, I didn't know about it and assumed you made a mistake. Sorry! :) |
6c7032c
to
e13c274
Compare
@mishako Not a problem! :) I think I've got all the changes in now! |
Added tests for the NumberParser class.
I've created a tool that uses Randoop to generate tests and then prunes them using PIT as a measure of quality. So far it's been useful in understanding which classes need more tests in a repo and approaches on how to add Line and Mutation Coverage.
Thought I would start with one of the simpler classes to test and once I get this reviewed I can submit a few more PRs with tests for other classes as well!