fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit 54ebc50ed7d06a503b9b7950b6d17c75af7e8d25 parent cd99166a51c5cfed88fedbf4210c834d2b102dff Author: John Hawthorn <john.hawthorn@gmail.com> Date: Sun, 16 Apr 2017 23:35:38 -0700 Use a tolerance for assertions on exact score This caused the test suite to fail on i386 (and possibly other archs), because the value was off my a minute amount due to floating point representation. Diffstat:
| M | test/test_match.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/test_match.c b/test/test_match.c @@ -5,7 +5,8 @@ #include "greatest/greatest.h" -#define ASSERT_SCORE_EQ(a,b) ASSERT_EQ_FMT((a), (b), "%f") +#define SCORE_TOLERANCE 0.000001 +#define ASSERT_SCORE_EQ(a,b) ASSERT_IN_RANGE((a), (b), SCORE_TOLERANCE) #define ASSERT_INT_EQ(a,b) ASSERT_EQ_FMT((a), (b), "%d") /* has_match(char *needle, char *haystack) */