stable ◦ Assignment of when subject to variable ◦ Unsigned integer types and arithmetic ◦ Function types with 255 parameters ◦ Multiplatform Random API ◦ Companion object for Boolean
a unit test if: • It talks to the database • It communicates across the network • It touches the file system • It can't run at the same time as any of your other unit tests • You have to do special things to your environment (such as editing config files) to run it
write any production code without first writing a failing unit test • Thou shalt not write any more of a unit test than is necessary to fail (and not compiling is failing) • Thou shalt not write any more production code than is needed to make the most recent failing unit test pass
on the next test. • Get GREEN ◦ Just focus on the simplest way to make that test pass. Don’t worry about refactoring! • Now REFACTOR ◦ Keep the same tests passing
more specific, the code gets more generic ◦ I.e. if your next test drives the code to be more specific, maybe you picked the wrong next test ◦ You’ll know if you get stuck
you’re evolving clean architecture ◦ Are you Red-Green-Refactoring your way to a monolith? • Refactor as needed with your awesome suite of super-fast unit tests
at all → code that employs nil 2. (nil → constant) 3. (constant → constant+) a simple constant to a more complex constant 4. (constant → scalar) replacing a constant with a variable or an argument 5. (statement → statements) adding more unconditional statements. 6. (unconditional → if) splitting the execution path 7. (scalar → array) 8. (array → container) 9. (statement → tail-recursion) 10. (if → while) 11. (statement → non-tail-recursion) 12. (expression → function) replacing an expression with a function or algorithm 13. (variable → assignment) replacing the value of a variable. 14. (case) adding a case (or else) to an existing switch or if