Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions style.md
Original file line number Diff line number Diff line change
Expand Up @@ -3691,6 +3691,10 @@ for _, tt := range tests {
}
```

Prefer table-test (structured) style when possible even for a single test case -
this style makes the tests easier to extend in the future as the the “arguments under
test” are clearly specified via `have` and `want`.

Parallel tests, like some specialized loops (for example, those that spawn
goroutines or capture references as part of the loop body),
must take care to explicitly assign loop variables within the loop's scope to
Expand Down