-
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.
First couple of Slime rules and tests converted to Reraku critiques
- Loading branch information
Showing
74 changed files
with
680 additions
and
4 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
2 changes: 1 addition & 1 deletion
2
repository/BaselineOfGrease.package/monticello.meta/categories.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 +1 @@ | ||
self packageOrganizer ensurePackage: #BaselineOfGrease withTags: #('Manifest')! | ||
SystemOrganization addCategory: #BaselineOfGrease! |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"separateMethodMetaAndSource" : false, | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
.../Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/class/checksClass.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,4 @@ | ||
testing - interest | ||
checksClass | ||
|
||
^ true |
11 changes: 11 additions & 0 deletions
11
...ease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/basicCheck..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,11 @@ | ||
running | ||
basicCheck: aClass | ||
|
||
^ aClass isMeta not | ||
and: [ (aClass includesSelector: #initialize) | ||
and: [ (#(GRObject GRNotification GRNotification GRError RBLintRule RBTransformationRule) noneSatisfy: [ :each | | ||
aClass includesBehavior: (Smalltalk globals at: each) ]) | ||
and: [ aClass class methodDictionary noneSatisfy: [ :each | | ||
matcher | ||
executeTree: each parseTree | ||
initialAnswer: false ] ] ] ] |
4 changes: 4 additions & 0 deletions
4
...ory/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/group.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,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'Grease Portability' |
8 changes: 8 additions & 0 deletions
8
...rease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/initialize.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,8 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
matcher := RBParseTreeSearcher new. | ||
matcher | ||
matches: 'self basicNew initialize' | ||
do: [ :node :answer | true ] |
4 changes: 4 additions & 0 deletions
4
...tory/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/name.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,4 @@ | ||
accessing | ||
name | ||
|
||
^ '#basicNew initialize is missing' |
4 changes: 4 additions & 0 deletions
4
...Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/rationale.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,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ '#initialize is not called implicitly when sending #new to an object in all Smalltalk dialects. Consider subclassing GRObject.' |
13 changes: 13 additions & 0 deletions
13
...itory/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/properties.json
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,13 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeBlockLintRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"matcher" | ||
], | ||
"name" : "GRBasicNewInitializeMissingRule", | ||
"type" : "normal" | ||
} |
Empty file.
15 changes: 15 additions & 0 deletions
15
...Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/afterCheck.mappings..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,15 @@ | ||
hooks | ||
afterCheck: aNode mappings: mappingDict | ||
|
||
| method | | ||
method := aNode methodNode. | ||
" This ensures that the description is of the form ClassName>>#selector:" | ||
(aNode arguments first isLiteralNode | ||
and: [ aNode arguments first value isString | ||
and: [ method methodClass name greaseString , '>>#' , method selector greaseString ~= aNode arguments first value ] ]) ifTrue: [ ^ true ]. | ||
|
||
" This ensures that the description is a string and ends with a dot." | ||
^ (aNode arguments size > 1 | ||
and: [ aNode arguments second isLiteralNode | ||
and: [ aNode arguments second value isString | ||
and: [ (aNode arguments second value endsWithSubCollection: '.') not ] ] ]) |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/group.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,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'Grease Formatting' |
8 changes: 8 additions & 0 deletions
8
...ry/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/initialize.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,8 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
matchesAny: #( | ||
'``@receiver greaseDeprecatedApi: ``@arg1' | ||
'``@receiver greaseDeprecatedApi: ``@arg1 details: ``@arg2' ) |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/name.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,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Invalid use of deprecated API protocol.' |
4 changes: 4 additions & 0 deletions
4
...ory/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/rationale.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,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ 'Make sure to follow the following pattern: self greaseDeprecatedApi: ''Class>>#selector'' details: ''Some description''.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/properties.json
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 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeParseTreeLintRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRDeprecatedApiProtocolRule", | ||
"type" : "normal" | ||
} |
Empty file.
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRReSlimeBlockLintRule.class/properties.json
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 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "ReAbstractRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRReSlimeBlockLintRule", | ||
"type" : "normal" | ||
} |
Empty file.
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRReSlimeParseTreeLintRule.class/properties.json
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 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "ReNodeMatchRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRReSlimeParseTreeLintRule", | ||
"type" : "normal" | ||
} |
1 change: 1 addition & 0 deletions
1
repository/Grease-Pharo110-Slime.package/monticello.meta/categories.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 @@ | ||
SystemOrganization addCategory: #'Grease-Pharo110-Slime'! |
Empty file.
1 change: 1 addition & 0 deletions
1
repository/Grease-Pharo110-Slime.package/monticello.meta/package
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 @@ | ||
(name 'Grease-Pharo110-Slime') |
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 @@ | ||
{ } |
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,5 @@ | ||
{ | ||
"separateMethodMetaAndSource" : false, | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
...ase-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/assertRule.expectedMatches..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,4 @@ | ||
running-checks | ||
assertRule: aRuleClass expectedMatches: aCollection | ||
|
||
self assertRule: aRuleClass expectedMatches: aCollection ignoring: Array new |
13 changes: 13 additions & 0 deletions
13
...-Pharo-Slime.package/GRReSlimeTest.class/instance/assertRule.expectedMatches.ignoring..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,13 @@ | ||
running-checks | ||
assertRule: aRuleClass expectedMatches: aCollectionOfExpectedEntities ignoring: aCollectionOfIgnoredEntities | ||
|
||
self run: aRuleClass ignoring: aCollectionOfIgnoredEntities do: [ :critiques | | critiquedEntities | | ||
critiquedEntities := critiques collect:[ :critique | critique sourceAnchor entity ]. | ||
critiquedEntities do:[ :critiquedEntity | | ||
self | ||
assert: (aCollectionOfExpectedEntities includes: critiquedEntity) | ||
description: critiquedEntity printString , ' should not be reported' ]. | ||
aCollectionOfExpectedEntities do: [ :expectedEntity | | ||
self | ||
assert: (critiquedEntities includes: expectedEntity) | ||
description: expectedEntity printString , ' should be reported' ] ] |
6 changes: 6 additions & 0 deletions
6
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/canParse..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 @@ | ||
accessing-code | ||
canParse: aString | ||
RBParser | ||
parseMethod: aString | ||
onError: [ :err :pos | ^ false ]. | ||
^ true |
3 changes: 3 additions & 0 deletions
3
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/category.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,3 @@ | ||
accessing | ||
category | ||
^ self class category , '-Data' |
7 changes: 7 additions & 0 deletions
7
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/compile.in..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,7 @@ | ||
accessing-code | ||
compile: aString in: aClass | ||
|
||
GRPlatform current | ||
compile: aString | ||
into: aClass | ||
classified: #accessing |
4 changes: 4 additions & 0 deletions
4
.../Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineClass.superclass..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,4 @@ | ||
accessing-code | ||
defineClass: aClassSymbol superclass: aSuperSymbol | ||
"For compatibility" | ||
^ self defineSubClassOf: aSuperSymbol |
20 changes: 20 additions & 0 deletions
20
...sitory/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineSubClassOf..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,20 @@ | ||
accessing-code | ||
defineSubClassOf: aSuperSymbol | ||
|
||
| class | | ||
class := SystemVersion current major >= 12 | ||
ifTrue: [ | ||
factory make: [ :aBuilder | | ||
aBuilder | ||
superclass: (Smalltalk at: aSuperSymbol); | ||
package: self category ] ] | ||
ifFalse: [ | ||
factory | ||
newSubclassOf: (Smalltalk at: aSuperSymbol) | ||
instanceVariableNames: '' | ||
classVariableNames: 'classVarsString' | ||
category: self category ]. | ||
environment | ||
addClass: class; | ||
addClass: class classSide. | ||
^ class |
7 changes: 7 additions & 0 deletions
7
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.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,7 @@ | ||
accessing | ||
rules | ||
^ OrderedCollection new | ||
addAll: GRReSlimeBlockLintRule allSubclasses; | ||
addAll: GRReSlimeParseTreeLintRule allSubclasses; | ||
" addAll: GRSlimeTransformationRule allSubclasses;" | ||
yourself |
28 changes: 28 additions & 0 deletions
28
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/run.ignoring.do..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,28 @@ | ||
running-checks | ||
run: aRuleClass ignoring: aCollectionOfEntities do: aBlock | ||
|
||
| rules rule runner | | ||
rules := self rules | ||
collect: [ :each | each new ]. | ||
rule := rules | ||
detect: [ :each | each isKindOf: aRuleClass ] | ||
ifNone: [ self error: ('{1} is not a slime rule' format: { aRuleClass name }) ]. | ||
self | ||
assert: (rule name isString and: [ rule name notEmpty ]) | ||
description: aRuleClass name , ' has no name'. | ||
self | ||
assert: (rule rationale isString and: [ rule rationale notEmpty and: [ rule rationale endsWithSubCollection: '.' ] ]) | ||
description: aRuleClass name , ' has no rationale'. | ||
runner := ReSmalllintChecker new. | ||
rules do: [ :each | | ||
runner | ||
rule: { each }; | ||
environment: environment; | ||
run ]. | ||
rules do: [ :each | | result | | ||
result := runner criticsOf: each. | ||
self | ||
assert: (rule = each or: [ result isEmpty "and: [ each changes isEmpty ]) or: [ aCollectionOfEntities includes: each class ]" ]) | ||
description: each name , ' should not report errors' ]. | ||
aBlock value: (runner criticsOf: rule). | ||
^ rule |
3 changes: 3 additions & 0 deletions
3
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/runCase.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,3 @@ | ||
running | ||
runCase | ||
GRPlatform current doSilently: [ super runCase ] |
15 changes: 15 additions & 0 deletions
15
...ease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/runTransformation.changes..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,15 @@ | ||
running-checks | ||
runTransformation: aClass changes: aCollection | ||
|
||
| expected | | ||
expected := aCollection | ||
collect: [ :each | RBParser parseMethod: each ]. | ||
self run: aClass ignoring: Array new do: [ :rule :rules | | ||
rule changes do: [ :change | | ||
self | ||
assert: (expected anySatisfy: [ :parseTree | change parseTree = parseTree ]) | ||
description: change selector , ' should not be transformed' ]. | ||
expected do: [ :parseTree | | ||
self | ||
assert: (rule changes anySatisfy: [ :change | change parseTree = parseTree ]) | ||
description: parseTree selector , ' should be transformed' ] ] |
6 changes: 6 additions & 0 deletions
6
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/setUp.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 | ||
setUp | ||
super setUp. | ||
factory := ClassFactoryForTestCase new. | ||
model := RBNamespace new. | ||
environment := RBClassEnvironment new |
5 changes: 5 additions & 0 deletions
5
repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/tearDown.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,5 @@ | ||
running | ||
tearDown | ||
|
||
super tearDown. | ||
factory cleanUp |
12 changes: 12 additions & 0 deletions
12
...ory/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiBooleansRule.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,12 @@ | ||
tests-transform | ||
testAnsiBooleansRule | ||
<expectedFailure> | ||
| class | | ||
class := self defineSubClassOf: #GRObject. | ||
self compile: 'and 1 and: [ 2 ] and: [ 3 ] and: [ 4 ]' in: class. | ||
self compile: 'or 1 or: [ 2 ] or: [ 3 ] or: [ 4 ]' in: class. | ||
self | ||
runTransformation: GRAnsiBooleansRule | ||
changes: #( | ||
'and 1 and: [ 2 and: [ 3 and: [ 4 ] ] ]' | ||
'or 1 or: [ 2 or: [ 3 or: [ 4 ] ] ]' ) |
10 changes: 10 additions & 0 deletions
10
...ry/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiCharacterRule.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,10 @@ | ||
tests-transform | ||
testAnsiCharacterRule | ||
<expectedFailure> | ||
| class | | ||
class := self defineSubClassOf: #GRObject. | ||
self compile: 'character Character value: 123' in: class. | ||
self compile: 'characterRange $a to: $c' in: class. | ||
self | ||
runTransformation: GRAnsiCharactersRule | ||
changes: #('character Character codePoint: 123' 'characterRange ''abc''') |
Oops, something went wrong.