From f3beb91856ff2babea54c11d17d235f9701657f1 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Tue, 28 Dec 2010 00:03:06 -0600 Subject: The rough lcs calculation can't be compared against MSF PEDANTIC testing showed an error with the current n * 4 + 6. pedantic_n = 7 and n = 6 during the PEDANTIC_TEST. I just reverting to old behavior until we can convert the value to something that can be compared to MSF. --- runner.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/runner.c b/runner.c index 5dd494d..bb97328 100644 --- a/runner.c +++ b/runner.c @@ -61,8 +61,10 @@ #ifdef PEDANTIC // use similar to "assert(a >= b);" # define PEDANTIC_TEST_GTE(a, b) {if ((a) < (b)) printf("Pedantic test failed (%s:%d): %s\n failed: %s (%d) >= %s (%d)\n", __FILE__, __LINE__, input_hex, #a, a, #b, b);} +# define PEDANTIC_TEST_GT(a, b) {if ((a) <= (b)) printf("Pedantic test failed (%s:%d): %s\n failed: %s (%d) > %s (%d)\n", __FILE__, __LINE__, input_hex, #a, a, #b, b);} #else # define PEDANTIC_TEST_GTE(a, b) +# define PEDANTIC_TEST_GT(a, b) #endif #ifdef TIMINGS @@ -263,10 +265,11 @@ int main() { * there is a match of 7 or greater, and sometimes return >0 if there * is a match of 4 or greater. */ - n = n * 4 + 6; - PEDANTIC_TEST_GTE(n, pedantic_n); - if (n < MSF) + // TODO: get this condition to compare against MSF + if (n == 0) { + PEDANTIC_TEST_GT(MSF, pedantic_n); break; + } } possible_matches++; -- cgit v1.2.3-54-g00ecf