Skip to content

Commit

Permalink
Add pointers to table driven tests and implementation notes
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed Feb 2, 2024
1 parent 34b83f8 commit 2fc6589
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects/interfaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,8 @@ filteringPipe.Write([]byte("start=1, end=10"))

we'll end up writing `start=, end=` to `someWriter`.

Make sure to write some tests for this type, too.
Make sure to write some tests for this type, too. These should probably be [table-driven tests](https://dave.cheney.net/2019/05/07/prefer-table-driven-tests).

## Thinking about trade-offs

When you're finished, have a read of the [sample implementation in the `impl/interfaces` branch](https://github.com/CodeYourFuture/immersive-go-course/tree/impl/interfaces/projects/interfaces). Read through the [IMPLEMENTATION.md](https://github.com/CodeYourFuture/immersive-go-course/blob/impl/interfaces/projects/interfaces/IMPLEMENTATION.md) file. It talks a lot about two different implementations of the tests for this project. Think about the trade-offs involved in both approaches.

0 comments on commit 2fc6589

Please sign in to comment.