Skip to content
Snippets Groups Projects

tests: replace ok(ret == KNOT_E???) with is_int(KNOT_E???, ret) to ease debugging

Merged Petr Špaček requested to merge tap_ok_to_isinst into master
  1. Jan 30, 2017
    • Petr Špaček's avatar
      tests: replace ok(ret == KNOT_E???) with is_int(KNOT_E???, ret) to ease debugging · 339f7a5f
      Petr Špaček authored and Daniel Salzman's avatar Daniel Salzman committed
      Throwing away unexpected retun codes makes debugging harder.
      TAP function is_int can nicely log mismatches which makes debugging easier.
      
      To make our lives easier I replaced all ok(ret == KNOT_E???) checks with
      is_int() calls. It was done using following command
      + manual review and reverts in libknot/test_control.c.
      
      $ find -name '*.c' | xargs sed -i 's#ok(ret == \(KNOT_E[0-9A-Z_]\+\),#is_int(\1, ret,#'
      339f7a5f