add check binary test, checking memory leak for cases