diff options
author | Eric Anderson <ejona86@gmail.com> | 2010-12-28 00:03:06 -0600 |
---|---|---|
committer | Eric Anderson <ejona86@gmail.com> | 2010-12-28 00:03:06 -0600 |
commit | f3beb91856ff2babea54c11d17d235f9701657f1 (patch) | |
tree | 1f62df20851a1df68e2e018c4c025c801962a3c3 | |
parent | 3378383d6fae63b9ad13138405d360bc30e0501f (diff) | |
download | md5game-f3beb91856ff2babea54c11d17d235f9701657f1.tar.gz md5game-f3beb91856ff2babea54c11d17d235f9701657f1.zip |
The rough lcs calculation can't be compared against MSFlcs_upper_bound
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.
-rw-r--r-- | runner.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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++; |