tests: replace ok(ret == KNOT_E???) with is_int(KNOT_E???, ret) to ease debugging
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,#'
Showing
- tests/contrib/test_base32hex.c 14 additions, 14 deletionstests/contrib/test_base32hex.c
- tests/contrib/test_base64.c 14 additions, 14 deletionstests/contrib/test_base64.c
- tests/contrib/test_hhash.c 2 additions, 2 deletionstests/contrib/test_hhash.c
- tests/contrib/test_sockaddr.c 1 addition, 1 deletiontests/contrib/test_sockaddr.c
- tests/libknot/test_control.c 6 additions, 6 deletionstests/libknot/test_control.c
- tests/libknot/test_cookies-client.c 6 additions, 6 deletionstests/libknot/test_cookies-client.c
- tests/libknot/test_cookies-opt.c 8 additions, 8 deletionstests/libknot/test_cookies-opt.c
- tests/libknot/test_cookies-server.c 16 additions, 16 deletionstests/libknot/test_cookies-server.c
- tests/libknot/test_db.c 3 additions, 3 deletionstests/libknot/test_db.c
- tests/libknot/test_edns.c 10 additions, 10 deletionstests/libknot/test_edns.c
- tests/libknot/test_pkt.c 14 additions, 14 deletionstests/libknot/test_pkt.c
- tests/libknot/test_rdataset.c 2 additions, 2 deletionstests/libknot/test_rdataset.c
- tests/libknot/test_rrset-wire.c 2 additions, 2 deletionstests/libknot/test_rrset-wire.c
- tests/libknot/test_yparser.c 26 additions, 26 deletionstests/libknot/test_yparser.c
- tests/libknot/test_ypscheme.c 8 additions, 8 deletionstests/libknot/test_ypscheme.c
- tests/libknot/test_yptrafo.c 18 additions, 18 deletionstests/libknot/test_yptrafo.c
- tests/test_acl.c 1 addition, 1 deletiontests/test_acl.c
- tests/test_changeset.c 7 additions, 7 deletionstests/test_changeset.c
- tests/test_conf.c 1 addition, 1 deletiontests/test_conf.c
- tests/test_conf_tools.c 6 additions, 6 deletionstests/test_conf_tools.c
Please register or sign in to comment