diff options
author | Jasper Ras <jaspert.ras@gmail.com> | 2025-05-20 07:19:33 +0200 |
---|---|---|
committer | Jasper Ras <jaspert.ras@gmail.com> | 2025-05-20 07:19:33 +0200 |
commit | a61d928b279c5c508aca3bfc7cb14d810c3d75de (patch) | |
tree | 6df664d4b58f1266e2782252547ed35e3c960b34 /Table driven tests.md | |
parent | d4bd3ad4a869c87fcfa4f83b42555a6c8e1bc746 (diff) |
vault backup: 2025-05-20 07:19:33
Diffstat (limited to 'Table driven tests.md')
-rw-r--r-- | Table driven tests.md | 14 |
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 |