[CodeEmitter] Improve testing for APInt encoding