Skip to content
Snippets Groups Projects
  • Colin Walters's avatar
    c2bcca04
    tests: Add macro for auto-error checking · c2bcca04
    Colin Walters authored
    Having our tests forced into a `goto out` style is seriously annoying
    since we can't write tests like we write production code.  Add
    a macro that checks for the error being NULL.
    
    This doesn't fully solve the problem since the test functions are
    still forced into `void` returns; at some point I may extend
    GLib to have `g_test_add_err_func()`.
    c2bcca04
    History
    tests: Add macro for auto-error checking
    Colin Walters authored
    Having our tests forced into a `goto out` style is seriously annoying
    since we can't write tests like we write production code.  Add
    a macro that checks for the error being NULL.
    
    This doesn't fully solve the problem since the test functions are
    still forced into `void` returns; at some point I may extend
    GLib to have `g_test_add_err_func()`.