-
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.
Merge pull request #168 from SeasideSt/fix-testEmptyStatements
Fixes Slime test for empty statements (will work correctly after fix …
- Loading branch information
Showing
3 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/expectedFailures.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
running | ||
expectedFailures | ||
|
||
SystemVersion current major >= 12 ifTrue:[ ^ #() ]. | ||
|
||
^ #(#testEmptyStatements) |
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 }. |