Testing and debugging macros

Section • 2 episodes • 1 hr 29 min

Macros can generate code for your application that is then compiled by Swift, and as such it is very important to test macros deeply. If a macro generates invalid Swift code you can be left with mystifying compiler errors. We explore a variety of techniques for testing and debugging macros.

Where to go from here

Now that we know how to test and debug macros, let’s apply these ideas to improve a concept that we explored many years ago: case paths.