News for hackers. Stuff that matters.
Re:The Use of assert() in SQLite by FrozenVoid on Friday April 26, 2019 @11:04PM (#19763512)
For reference, they use this code instead of assert:

    #if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_MUTATION_TEST)
    # define ALWAYS(X)      (1)
    # define NEVER(X)       (0)
    #elif !defined(NDEBUG)
    # define ALWAYS(X)      ((X)?1:(assert(0),0))
    # define NEVER(X)       ((X)?(assert(0),1):0)
    #else
    # define ALWAYS(X)      (X)
    # define NEVER(X)       (X)
    #endif
Re:The Use of assert() in SQLite by bayareanative on Saturday April 27, 2019 @04:07AM (#19764453)
ALWAYS and NEVER don't pass-through their values consistently as claimed in debug builds, they pass through truthiness instead, with actual values in release builds. Perhaps this would be better for debug builds:

    #define ALWAYS(X) (assert(X), (X))
    #define NEVER(X) (assert(!(X)), (X))
Re:The Use of assert() in SQLite by pawelmurias on Saturday April 27, 2019 @04:47AM (#19764575)
That would duplicate X
Re:The Use of assert() in SQLite by ahaferburg on Saturday April 27, 2019 @08:17AM (#19765156)
In addition to, not instead of.