✏️10.6 어서션 추가하기 (Introduce Assertion)
if (this.discountRate)
base = base - (this.discountRate * base);assert(this.discountRate >= 0);
if (this.discountRate)
base = base - (this.discountRate * base);🧷 배경
🧷 절차
🧷 예시
🧷 리팩터링 전
🧷 리팩터링 후
Previous10.5 특이 케이스 추가하기 (Introduce Special Case)Next10.7 제어 플래그를 탈출문으로 바꾸기 (Replace Control Flag with Break)
Last updated