-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes Slime test for empty statements (will work correctly after fix …
…for issue pharo-project/pharo#15955 is merged into Pharo)
- Loading branch information
Showing
2 changed files
with
12 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
17 changes: 10 additions & 7 deletions
17
...tory/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testEmptyStatements.st
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,15 +1,18 @@ | ||
tests-block | ||
testEmptyStatements | ||
"We added this test to make sure that this Pharo-supplied rule works because we previously had this one in Grease and it is important." | ||
<expectedFailure> | ||
|
||
| class | | ||
class := self defineSubClassOf: #GRObject. | ||
self compile: 'emptyStatement1. self and' in: class. | ||
self compile: 'emptyStatement2 self and..' in: class. | ||
self compile: 'emptyStatement3 self and."foo".' in: class. | ||
self compile: 'emptyStatement4 self and."foo".self and' in: class. | ||
self compile: 'emptyStatement1.', (String with: Character cr), ' self and' in: class. | ||
self compile: 'emptyStatement2', (String with: Character cr), ' self and..' in: class. | ||
self compile: 'emptyStatement3', (String with: Character cr), ' self and."foo".' in: class. | ||
self compile: 'emptyStatement4', (String with: Character cr), ' self and."foo".self and' in: class. | ||
self | ||
assertRule: ReMultiplePeriodsTerminatingStatementRule | ||
matches: { class>>#emptyStatement1 . class>>#emptyStatement2 . class>>#emptyStatement3 . class>>#emptyStatement4 } | ||
ignoring: (Array with: ReUnnecessaryLastPeriodRule) | ||
matches: { class>>#emptyStatement2 . class>>#emptyStatement3 . class>>#emptyStatement4 } | ||
ignoring: { ReMethodSignaturePeriodRule }. | ||
self | ||
assertRule: ReMethodSignaturePeriodRule | ||
matches: { class>>#emptyStatement1 } | ||
ignoring: { ReMultiplePeriodsTerminatingStatementRule }. |