Skip to content

Commit 2fc6589

Browse files
committed
Add pointers to table driven tests and implementation notes
1 parent 34b83f8 commit 2fc6589

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/interfaces/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,8 @@ filteringPipe.Write([]byte("start=1, end=10"))
9292

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

95-
Make sure to write some tests for this type, too.
95+
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).
96+
97+
## Thinking about trade-offs
98+
99+
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 commit comments

Comments
 (0)