summaryrefslogtreecommitdiff
path: root/Testing Golang programs.md
diff options
context:
space:
mode:
authorJasper Ras <jaspert.ras@gmail.com>2025-04-18 21:01:49 +0200
committerJasper Ras <jaspert.ras@gmail.com>2025-04-18 21:01:49 +0200
commita8a8e1f984f20c8008f3a5f57cd39b416eb73104 (patch)
tree2262794b52d82c5fd9cbc55b503b52fafbd3af8a /Testing Golang programs.md
parent5fa69499917fab7a026c90c8321dbcc22734106a (diff)
parentab409a3701bf59dd73dc1e0324376bdac8b6d74f (diff)
vault backup: 2025-04-18 21:01:49
Diffstat (limited to 'Testing Golang programs.md')
-rw-r--r--Testing Golang programs.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/Testing Golang programs.md b/Testing Golang programs.md
new file mode 100644
index 0000000..e9d48de
--- /dev/null
+++ b/Testing Golang programs.md
@@ -0,0 +1,9 @@
+---
+tags:
+ - golang
+ - howto
+---
+`go test` reads files ending with `_test.go`: 3 specialized functions:
+- Test functions; names start with Test, 1 arg. \*testing.T
+- Benchmarks: names start with Benchmarkt, 1 arg: \*testing.B
+- Example functions: names start with Example \ No newline at end of file