Add signed min value test
Remove needless global variable
refactoring setting predefined macros