mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-12 23:15:52 +08:00
run tests when no input is provided and skip tests when input polynomial is provided
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user