From 23ee5949c2e550ef6f5e9bc12ad169908d4cc3ae Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Mon, 11 Oct 2021 12:57:34 -0400 Subject: [PATCH] Added new tests --- test/mee/testStringAlgorithms.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/mee/testStringAlgorithms.cpp b/test/mee/testStringAlgorithms.cpp index aa2e10f..9f6f529 100644 --- a/test/mee/testStringAlgorithms.cpp +++ b/test/mee/testStringAlgorithms.cpp @@ -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; }