File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1+ running
2+ expectedFailures
3+
4+ SystemVersion current major >= 12 ifTrue: [ ^ #() ].
5+
6+ ^ #(#testEmptyStatements)
Original file line number Diff line number Diff line change 55 addAll: GRSlimeBlockLintRule allSubclasses;
66 addAll: GRSlimeParseTreeLintRule allSubclasses;
77 addAll: GRSlimeTransformationRule allSubclasses;
8+ add: ReMultiplePeriodsTerminatingStatementRule ;
9+ add: ReMethodSignaturePeriodRule ;
810 yourself ) reject: #isAbstract
Original file line number Diff line number Diff line change 11tests- block
22testEmptyStatements
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 }.
You can’t perform that action at this time.
0 commit comments