From d8c61b2d14acaa34fa80be05f215c3ed2c6c895b Mon Sep 17 00:00:00 2001 From: Lajat5 <64376519+Lazeeez@users.noreply.github.com> Date: Wed, 10 Nov 2021 16:49:57 +0530 Subject: [PATCH] Update dynamic_programming/partition_problem.cpp Co-authored-by: David Leal --- dynamic_programming/partition_problem.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dynamic_programming/partition_problem.cpp b/dynamic_programming/partition_problem.cpp index 7537003a5..586a1800b 100644 --- a/dynamic_programming/partition_problem.cpp +++ b/dynamic_programming/partition_problem.cpp @@ -92,11 +92,8 @@ static void test() { bool expected_result = true; bool derived_result = dp::partitionProblem::findPartiion(arr, n); std::cout << "1st test: "; - if (expected_result == derived_result) { - std::cout << "Passed!" << std::endl; - } else { - std::cout << "Failed!" << std::endl; - } + assert(expected_result == derived_result); + std::cout << "Passed!" << std::endl; } /*******************************************************************************