• A
    define setUp and tearDown under UNITY_WEAK_PRAGMA · d4b83f18
    Andy Isaacson 提交于
    The intent of UNITY_WEAK_PRAGMA is that we have weak symbols for setUp
    and tearDown in unity.o, so that developers can override these symbols
    if needed but the link works right if they are not defined.
    
    In order to do this using #pragma, the pragma and the definition of the
    function (not the declaration) need to be present in the same translation
    unit (source code file).
    
    Previously, the UNITY_WEAK_PRAGMA code was just declaring the setUp
    function, but not defining it, which means that developers had to add an
    empty setUp function to their tests in order to link.
    d4b83f18
unity.c 41.1 KB