Using Module Attributes for Code Generation

Learn about module attributes and how they help in keeping track of test cases.

Before we can implement the test macro, we need to address a missing piece of our implementation. A user can define multiple test cases, but we have can’t track each test-case definition for inclusion within MathTest.run/0. Fortunately, Elixir solves this use case via module attributes.

Get hands-on with 1200+ tech skills courses.