Skip to content

Commit 1560a33

Browse files
author
Frotty
committed
Update conventions
1 parent 81b8898 commit 1560a33

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

_doc/manual/conventions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ As a general rule, avoid horizontal alignment of any kind. Renaming an identifie
105105

106106
#### Lambda formatting
107107

108-
In lambda expressions, spaces should be used around the `begin` and `end` keywords, as well as around the arrow which separates the parameters from the body. If a call takes a single lambda, it should be passed outside of parentheses whenever possible.
108+
In lambda expressions, spaces should be used around the `begin` and `end` keywords, as well as around the arrow which separates the parameters from the body. If a call takes a single lambda, it should be passed outside of parentheses whenever possible. Prefer putting lambda parameters as the last argument, so it can be written without `begin` and `end`.
109109

110110
```wurst
111111
list.filter(t -> t > 10)
@@ -148,5 +148,7 @@ When making a choice between a complex expression using multiple higher-order fu
148148

149149
### Unit Testing
150150

151-
Prefer test driven development if the feature is not too dependent from wc3 game mechanics. Create small, self-contained functions, annotate them with `@Test` individually and give them a descriptive name.
152-
Make sure to have at least one **assertion** inside your test to verify the behavior.
151+
Prefer test driven development if the feature is not too dependent on wc3 game mechanics. Create small, self-contained functions, annotate them with `@Test` individually and give them a descriptive name.
152+
Make sure to have at least one **assertion** inside your test to verify the behavior.
153+
154+
Tests should either be placed at the end of a package, or into a separate package suffixed `Tests` which will be ignored for autocomplete suggestions. Code and Tests should not be mixed.

0 commit comments

Comments
 (0)