testing - Is it bad practice to use the weak attribute to write test code in c? -


is practice use weak attribute in production code test code 1 can override functions?

i don't know if good practice, there ways override functions in test code not interfere production code:

  • using macros redefine function names wish override
  • using ld_preload
  • using macros expand __weak in debug mode , nothing in production mode.

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -