From 586ac1aee190bb21d2115811fefc9f9c867f2c46 Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Thu, 4 Jun 2020 13:59:24 -0400 Subject: [PATCH] run tests when no input is provided and skip tests when input polynomial is provided --- numerical_methods/durand_kerner_roots.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/numerical_methods/durand_kerner_roots.cpp b/numerical_methods/durand_kerner_roots.cpp index a970829ca..13e79dbd9 100644 --- a/numerical_methods/durand_kerner_roots.cpp +++ b/numerical_methods/durand_kerner_roots.cpp @@ -257,10 +257,9 @@ void test2() { * will find roots of the polynomial \f$1\cdot x^2 + 0\cdot x^1 + (-4)=0\f$ **/ int main(int argc, char **argv) { - test1(); - test2(); - if (argc < 2) { + test1(); // run tests when no input is provided + test2(); // and skip tests when input polynomial is provided std::cout << "Please pass the coefficients of the polynomial as " "commandline " "arguments.\n";