-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test formatting logical operator expressions. (#1272)
Test formatting logical operator expressions. (They were already working but not tested.) Also format boolean literals.
- Loading branch information
1 parent
5081f21
commit 3947cb5
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
40 columns | | ||
>>> Unsplit mixed. | ||
true||false&&true||false&&false; | ||
<<< | ||
true || false && true || false && false; | ||
>>> If any `&&` operator splits, they all do. | ||
operand1 && operand2 && operand3 && operand4; | ||
<<< | ||
operand1 && | ||
operand2 && | ||
operand3 && | ||
operand4; | ||
>>> If any `||` operator splits, they all do. | ||
operand1 || operand2 || operand3 || operand4; | ||
<<< | ||
operand1 || | ||
operand2 || | ||
operand3 || | ||
operand4; | ||
>>> Prefer to split `||` over `&&`. | ||
operand1 || operand2 && operand3 || operand4; | ||
<<< | ||
operand1 || | ||
operand2 && operand3 || | ||
operand4; | ||
>>> | ||
operand1 && operand2 || operand3 && operand4; | ||
<<< | ||
operand1 && operand2 || | ||
operand3 && operand4; | ||
>>> Mix `&&` with other binary operators. | ||
operand1 > operand2 && operand3 == operand4 && operand5 + operand6; | ||
<<< | ||
operand1 > operand2 && | ||
operand3 == operand4 && | ||
operand5 + operand6; | ||
>>> Mix `||` with other binary operators. | ||
operand1 > operand2 || operand3 == operand4 || operand5 + operand6; | ||
<<< | ||
operand1 > operand2 || | ||
operand3 == operand4 || | ||
operand5 + operand6; |