-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
format: make groupIterable sort by row
Before, it depended on the elements being passed in ordered by their rows. Before #3823, the iteration order was the same as the row order; but with sorting the keys slice (which determines iteration order) on creation, that was changed. Now, we'll sort the elements within `groupIterable`. Fixes #3849. Signed-off-by: Stephan Renatus <[email protected]>
- Loading branch information
Showing
4 changed files
with
80 additions
and
4 deletions.
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
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,33 @@ | ||
package test_issue_3849 | ||
|
||
test_require_context { | ||
require_context("monkey", "eat", "banana") with input as { | ||
"principal": {"id": 101, "type": "monkey"}, | ||
"action": "eat", | ||
"entity": {"id": 102, "type": "banana"}, | ||
} | ||
} | ||
|
||
test_contrived { | ||
allow with input as { | ||
"a": 101, | ||
"b": 101, | ||
"z": 101, | ||
"y": 101, | ||
"x": 101, | ||
"w": 101, | ||
"v": 101, | ||
"u": 101, | ||
"t": 101, | ||
"s": 101, | ||
"r": 101, | ||
"q": 101, | ||
"p": 101, | ||
"o": 101, | ||
"n": 101, | ||
"j": 101, | ||
"k": 101, | ||
"l": 101, | ||
"m": 101, | ||
} | ||
} |
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,33 @@ | ||
package test_issue_3849 | ||
|
||
test_require_context { | ||
require_context("monkey", "eat", "banana") with input as { | ||
"principal": {"id": 101, "type": "monkey"}, | ||
"action": "eat", | ||
"entity": {"id": 102, "type": "banana"}, | ||
} | ||
} | ||
|
||
test_contrived { | ||
allow with input as { | ||
"a": 101, | ||
"b": 101, | ||
"z": 101, | ||
"y": 101, | ||
"x": 101, | ||
"w": 101, | ||
"v": 101, | ||
"u": 101, | ||
"t": 101, | ||
"s": 101, | ||
"r": 101, | ||
"q": 101, | ||
"p": 101, | ||
"o": 101, | ||
"n": 101, | ||
"j": 101, | ||
"k": 101, | ||
"l": 101, | ||
"m": 101, | ||
} | ||
} |