fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit 99e3c936e383dda5686ccf42f88a77dec9a44653 parent f54e49113ef52ac81405594a4979b356094483a6 Author: John Hawthorn <john.hawthorn@gmail.com> Date: Sat, 27 Sep 2014 16:43:40 -0700 Reformat assert macro Diffstat:
| M | fzytest.c | | | 8 | +++++++- |
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fzytest.c b/fzytest.c @@ -7,7 +7,13 @@ int testsrun = 0, testsfailed = 0, assertionsrun = 0; -#define assert(x) if(++assertionsrun && !(x)){fprintf(stderr, "test \"%s\" failed\n assert(%s) was false\n at %s:%i\n\n", __func__, #x, __FILE__ ,__LINE__);raise(SIGTRAP);testsfailed++;return;} +#define assert(x) \ + if(++assertionsrun && !(x)){ \ + fprintf(stderr, "test \"%s\" failed\n assert(%s) was false\n at %s:%i\n\n", __func__, #x, __FILE__ ,__LINE__); \ + raise(SIGTRAP); \ + testsfailed++; \ + return; \ + } #define assert_streq(a, b) assert(!strcmp(a, b))