summaryrefslogtreecommitdiff
path: root/Table driven tests.md
blob: e2b2f3aaa72b46f159afc3620ef0c5439d12bf19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---
tags:
  - testing
---
https://go.dev/wiki/TableDrivenTests
---

[[Testing Golang programs]] [[Test fixture]]

---

Sign when to use: copy and pasting tests. 
Similar to what we do with phpunit/prophecy : providing a dataProvider.
In go we can just define a slice of structs or a map and loop over it in our test function.