X Tutup
Skip to content

Commit 64ac15d

Browse files
author
Johan Brichau
committed
Fixes Slime test for empty statements (will work correctly after fix for issue pharo-project/pharo#15955 is merged into Pharo)
1 parent 4990652 commit 64ac15d

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.st

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ rules
55
addAll: GRSlimeBlockLintRule allSubclasses;
66
addAll: GRSlimeParseTreeLintRule allSubclasses;
77
addAll: GRSlimeTransformationRule allSubclasses;
8+
add: ReMultiplePeriodsTerminatingStatementRule;
9+
add: ReMethodSignaturePeriodRule;
810
yourself) reject: #isAbstract
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
tests-block
22
testEmptyStatements
33
"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."
4-
<expectedFailure>
54

65
| class |
76
class := self defineSubClassOf: #GRObject.
8-
self compile: 'emptyStatement1. self and' in: class.
9-
self compile: 'emptyStatement2 self and..' in: class.
10-
self compile: 'emptyStatement3 self and."foo".' in: class.
11-
self compile: 'emptyStatement4 self and."foo".self and' in: class.
7+
self compile: 'emptyStatement1.', (String with: Character cr), ' self and' in: class.
8+
self compile: 'emptyStatement2', (String with: Character cr), ' self and..' in: class.
9+
self compile: 'emptyStatement3', (String with: Character cr), ' self and."foo".' in: class.
10+
self compile: 'emptyStatement4', (String with: Character cr), ' self and."foo".self and' in: class.
1211
self
1312
assertRule: ReMultiplePeriodsTerminatingStatementRule
14-
matches: { class>>#emptyStatement1 . class>>#emptyStatement2 . class>>#emptyStatement3 . class>>#emptyStatement4 }
15-
ignoring: (Array with: ReUnnecessaryLastPeriodRule)
13+
matches: { class>>#emptyStatement2 . class>>#emptyStatement3 . class>>#emptyStatement4 }
14+
ignoring: { ReMethodSignaturePeriodRule }.
15+
self
16+
assertRule: ReMethodSignaturePeriodRule
17+
matches: { class>>#emptyStatement1 }
18+
ignoring: { ReMultiplePeriodsTerminatingStatementRule }.

0 commit comments

Comments
 (0)
X Tutup