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
Tests and additional checks #1
Conversation
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.
Hi Fedor, thanks a lot for your contribution and welcome to the project, finally ;-)
I found two minors, which I would kindly ask you to fix and then, I will be happy to merge it. Hoping for more!
getUpperBound(n - 1); | ||
} catch (IndexOutOfBoundsException outOfBoundException) { | ||
throw new IllegalArgumentException( | ||
"Can not initialize a genotype with " + n + " entries with the specified bounds"); |
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.
Could you please rethrow outOfBoundException?
throw new IllegalArgumentException( "Cannot initialize a genotype with " + n + " entries with the specified bounds", outOfBoundException);
getUpperBound(n - 1); | ||
} catch (IndexOutOfBoundsException outOfBoundException) { | ||
throw new IllegalArgumentException( | ||
"Can not initialize a genotype with " + n + " entries with the specified bounds"); |
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.
As above, could you please rethrow outOfBoundException?
throw new IllegalArgumentException( "Cannot initialize a genotype with " + n + " entries with the specified bounds", outOfBoundException);
Created tests for the bounds and the double and the integer genotypes. Also added checks concerning the size of the bounds in the bounds and the genotype classes.