mirror of
https://bitbucket.org/Mattrixwv/my-classes.git
synced 2025-12-06 18:23:57 -05:00
Added new tests
This commit is contained in:
@@ -196,6 +196,22 @@ bool testIsPandigital(){
|
||||
return false;
|
||||
}
|
||||
|
||||
//Test 5
|
||||
num = "1";
|
||||
correctAnswer = true;
|
||||
answer = mee::isPandigital(num, '1', '1');
|
||||
if(correctAnswer != answer){
|
||||
return false;
|
||||
}
|
||||
|
||||
//Test 6
|
||||
num = "112";
|
||||
correctAnswer = false;
|
||||
answer = mee::isPandigital(num, '1', '3');
|
||||
if(correctAnswer != answer){
|
||||
return false;
|
||||
}
|
||||
|
||||
//If it hasn't failed a test then return true for passing all the tests
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user