mirror of
https://bitbucket.org/Mattrixwv/javaclasses.git
synced 2025-12-06 15:03:58 -05:00
Update test coverage
This commit is contained in:
@@ -264,13 +264,8 @@ public class NumberAlgorithms{
|
|||||||
|
|
||||||
//If for some reason the goalNumber is not 1 throw an error
|
//If for some reason the goalNumber is not 1 throw an error
|
||||||
if(goalNumber != 1){
|
if(goalNumber != 1){
|
||||||
if(isPrime(goalNumber)){
|
|
||||||
factors.add(goalNumber);
|
factors.add(goalNumber);
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
throw new InvalidResult("The factor was not 1: " + goalNumber);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Return the list of factors
|
//Return the list of factors
|
||||||
return factors;
|
return factors;
|
||||||
@@ -303,13 +298,8 @@ public class NumberAlgorithms{
|
|||||||
|
|
||||||
//If for some reason the goalNumber is not 1 throw an error
|
//If for some reason the goalNumber is not 1 throw an error
|
||||||
if(!goalNumber.equals(BigInteger.ONE)){
|
if(!goalNumber.equals(BigInteger.ONE)){
|
||||||
if(isPrime(goalNumber)){
|
|
||||||
factors.add(goalNumber);
|
factors.add(goalNumber);
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
throw new InvalidResult("The factor was not 1: " + goalNumber);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Return the list of factors
|
//Return the list of factors
|
||||||
return factors;
|
return factors;
|
||||||
|
|||||||
Reference in New Issue
Block a user