The purpose of testing and refactoring

Programming is like drawing water from a well. The
complexity gradually approaches, and you don’t notice it, and soon you will become a cooked frog.

Don't try to find some unreliable subjective rules.
All skills are the same. Only by taking the time to learn the rules can you break the rules.

One of the advantages of TDD will never forget what to do next-just rerun the test to know

One of the rules of unit testing is not to test constants.
Unit testing is actually to test logic, process control and configuration

TDD process

  • function test
  • unit test
  • 'Unit testing/writing code' loop
  • Refactor

Guess you like

Origin blog.csdn.net/xiaoxiaodechongzi/article/details/107686353