summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcia Ramos <marcia@gitlab.com>2019-07-24 12:33:08 +0000
committerMarcia Ramos <marcia@gitlab.com>2019-07-24 12:33:08 +0000
commitc1f4c999e8bce7c1d3fb4fcff32190c13666f4cf (patch)
treef7857a253c4226951e645c2eafd8c5de20206629
parent77247efa76376571480844e33e55ab29ca42af0c (diff)
downloadgitlab-ce-docs/add-go-test-guidelines.tar.gz
Grammar: "table driven" to "table-driven".docs/add-go-test-guidelines
-rw-r--r--doc/development/go_guide/index.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/development/go_guide/index.md b/doc/development/go_guide/index.md
index c78f10510b8..9f0ac8cc753 100644
--- a/doc/development/go_guide/index.md
+++ b/doc/development/go_guide/index.md
@@ -173,9 +173,9 @@ func Test(t *testing.T) {
}
```
-### Table Driven Tests
+### Table-Driven Tests
-Using [Table Driven Tests](https://github.com/golang/go/wiki/TableDrivenTests)
+Using [Table-Driven Tests](https://github.com/golang/go/wiki/TableDrivenTests)
is generally good practice when you have multiple entries of
inputs/outputs for the same function. Below are some guidelines one can
follow when writing table-driven test. These guidelines are mostly
@@ -206,7 +206,7 @@ to make the test output easily readable.
#### Variable names
-- Each table driven test map/slice of struct can be named `tests`.
+- Each table-driven test map/slice of struct can be named `tests`.
- When looping through `tests` the anonymous struct can be referred
to as `tt` or `tc`.
- The description of the test can be referred to as