-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/topic/robin/gh-1871-max-size'
* origin/topic/robin/gh-1871-max-size: Fix `&max-size` on unit containing a `switch`.
- Loading branch information
Showing
6 changed files
with
34 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.12.0-dev.138 | ||
1.12.0-dev.140 |
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
2 changes: 2 additions & 0 deletions
2
tests/Baseline/spicy.types.unit.max-size-with-switch-fail/output
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,2 @@ | ||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. | ||
[error] terminating with uncaught exception of type spicy::rt::ParseError: parsing not done within &max-size bytes (<...>/max-size-with-switch-fail.spicy:12:3-12:13) |
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,12 @@ | ||
# @TEST-EXEC-FAIL: printf 12345 | spicy-driver -d %INPUT >output 2>&1 | ||
# @TEST-EXEC: btest-diff output | ||
# | ||
# @TEST-DOC: Switch clause with a &max-size attribute exceeded by our input | ||
|
||
module foo; | ||
|
||
public type X = unit { | ||
switch (0) { | ||
* -> : bytes &eod; | ||
}; | ||
} &max-size=3; |
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,11 @@ | ||
# @TEST-EXEC: echo -n | spicy-driver -d %INPUT | ||
# | ||
# @TEST-DOC: Switch clause with a &max-size attribute never reached; regression test for #1871 | ||
|
||
module foo; | ||
|
||
public type X = unit { | ||
switch (0) { | ||
* -> : void; | ||
}; | ||
} &max-size=4711; # Should never fail as unit consumes zero bytes. |