From b67f6bbb296285cdea9ca7cf9597d8f91380e3e6 Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Fri, 5 Feb 2021 10:29:45 +0000 Subject: [PATCH] Fix command line interface for math_brute_force (#1145) Ensure the following forms of command lines are supported, as per usage message (-h): - math_brute_force [ [ ... []]] - math_brute_force I [J] Remove dead/unnecessary code. Fix regression introduced in f337e0b6 ( Fix command-line function range for bruteforce (#1127), 2021-01-29). Signed-off-by: Marco Antognini --- test_conformance/math_brute_force/main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test_conformance/math_brute_force/main.cpp b/test_conformance/math_brute_force/main.cpp index 254b22aa..1b63c828 100644 --- a/test_conformance/math_brute_force/main.cpp +++ b/test_conformance/math_brute_force/main.cpp @@ -140,7 +140,8 @@ int doTest(const char *name) const Func *const temp_func = functionList + i; if (strcmp(temp_func->name, name) == 0) { - if (i < gStartTestNumber || i > gEndTestNumber) + if ((gStartTestNumber != -1 && i < gStartTestNumber) + || i > gEndTestNumber) { vlog("Skipping function #%d\n", i); return 0; @@ -844,10 +845,6 @@ int main(int argc, const char *argv[]) "----------------------------------------\n"); gMTdata = init_genrand(gRandomSeed); - if (gEndTestNumber == 0) - { - gEndTestNumber = functionListCount; - } FPU_mode_type oldMode; DisableFTZ(&oldMode);