Skip to content

Commit

Permalink
Fix slime tests in Pharo 12
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Dec 27, 2023
1 parent dce1ac7 commit 823f3f4
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ testBlockFormatting
class := self
defineClass: #GRSlimeMockObject
superclass: #GRObject.
class
self
compile: 'invalid1
[:a ]'
classified: #(accessing).
class
in: class.
self
compile: 'invalid2
[:a | ]'
classified: #(accessing).
class
in: class.
self
compile: 'invalid3
[ :b]'
classified: #(accessing).
in: class.

class
self
compile: 'invalid4
[ :a| ]'
classified: #(accessing).
class
in: class.
self
compile: 'invalid5
[ :a |a ]'
classified: #(accessing).
in: class.
self
runRule: GRBlockFormattingRule
selectors: #(invalid1 invalid2 invalid3 invalid4 invalid5)
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ testParensFormatting
class := self
defineClass: #GRSlimeMockObject
superclass: #GRObject.
class
self
compile: 'invalid1
( 1 + 2)'
classified: #(accessing).
class
in: class.
self
compile: 'invalid2
(1 + 2 )'
classified: #(accessing).
in: class.
self
runRule: GRParensFormattingRule
selectors: #(invalid1 invalid2)
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ testReturnFormatting
class := self
defineClass: #GRSlimeMockObject
superclass: #GRObject.
class
self
compile: 'invalid1
^1'
classified: #(accessing).
class
in: class.
self
compile: 'invalid2
^ 2'
classified: #(accessing).
in: class.
self
runRule: GRReturnFormattingRule
selectors: #(invalid1 invalid2)
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ testTempsFormatting
class := self
defineClass: #GRSlimeMockObject
superclass: #GRObject.
class
self
compile: 'invalid1
| a|'
classified: #(accessing).
class
in: class.
self
compile: 'invalid2
|a |'
classified: #(accessing).
class
in: class.
self
compile: 'invalid3
| a b |'
classified: #(accessing).
in: class.
self
runRule: GRTempsFormattingRule
selectors: #(invalid1 invalid2 invalid3)
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ testUsesCanPerformOrUnderstand
class := self
defineClass: #GRSlimeMockObject
superclass: #GRObject.
class
self
compile: 'invalid1
Object class canUnderstand: #new'
classified: #(accessing).
class
in: class.
self
compile: 'invalid2
Object class canPerform: #new'
classified: #(accessing).
class
in: class.
self
compile: 'valid
Object respondsTo: #new'
classified: #(accessing).
in: class.
self
runRule: GRUsesCanPerformOrUnderstandRule
selectors: #(invalid1 invalid2)
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ testUsesClassForHash
class := self
defineClass: #GRSlimeMockObject
superclass: #GRObject.
class
self
compile: 'foo
^ super hash bitXor: self class hash'
classified: #(accessing).
class
in: class.
self
compile: 'hash
^ super hash bitXor: self class hash'
classified: #(accessing).
in: class.
self
runRule: GRUsesClassForHashRule
selectors: #(hash)
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ testUsesCurlyBraceArrays
class := self
defineClass: #GRSlimeMockObject
superclass: #GRObject.
class
self
compile: 'invalid
^ { self foo. self bar }'
classified: #(accessing).
class
in: class.
self
compile: 'valid
^ Array new'
classified: #(accessing).
in: class.
self
runRule: GRUsesCurlyBraceArraysRule
selectors: #(invalid)
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ testUsesLiteralByteArrays
class := self
defineClass: #GRSlimeMockObject
superclass: #GRObject.
class
self
compile: 'invalid
^ #[ 1 2 3 ]'
classified: #(accessing).
class
in: class.
self
compile: 'valid
^ ByteArray with: 1 with: 2 with: 3'
classified: #(accessing).
in: class.
self
runRule: GRUsesLiteralByteArraysRule
selectors: #(invalid)

0 comments on commit 823f3f4

Please sign in to comment.