summaryrefslogtreecommitdiff
path: root/Table driven tests.md
diff options
context:
space:
mode:
Diffstat (limited to 'Table driven tests.md')
-rw-r--r--Table driven tests.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/Table driven tests.md b/Table driven tests.md
new file mode 100644
index 0000000..e2b2f3a
--- /dev/null
+++ b/Table driven tests.md
@@ -0,0 +1,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. \ No newline at end of file