diff --git a/repository/BaselineOfGrease.package/.filetree b/repository/BaselineOfGrease.package/.filetree index 8998102c..57a67973 100644 --- a/repository/BaselineOfGrease.package/.filetree +++ b/repository/BaselineOfGrease.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineSqueak..st b/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineSqueak..st index e93226b5..2e742705 100644 --- a/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineSqueak..st +++ b/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineSqueak..st @@ -22,14 +22,7 @@ baselineSqueak: spec package: 'Grease-Tests-Squeak-Core' with: [ spec requires: #('Grease-Tests-Core') ]; package: 'Grease-Tests-Squeak5-Core' - with: [ spec requires: #('Grease-Tests-Squeak-Core') ]; - package: 'Grease-Slime' - with: [ spec requires: #('Refactoring-Core' 'Grease-Core') ]; - package: 'Grease-Tests-Slime' - with: [ spec requires: #('Grease-Slime') ]. - spec - group: 'Slime' with: #('Grease-Slime'); - group: 'Slime Tests' with: #('Grease-Tests-Slime') ]. + with: [ spec requires: #('Grease-Tests-Squeak-Core') ] ]. spec for: #(#'squeak6.x') do: [ @@ -52,11 +45,4 @@ baselineSqueak: spec package: 'Grease-Tests-Squeak-Core' with: [ spec requires: #('Grease-Tests-Core') ]; package: 'Grease-Tests-Squeak6-Core' - with: [ spec requires: #('Grease-Tests-Squeak-Core') ]; - package: 'Grease-Slime' - with: [ spec requires: #('Refactoring-Core' 'Grease-Core') ]; - package: 'Grease-Tests-Slime' - with: [ spec requires: #('Grease-Slime') ]. - spec - group: 'Slime' with: #('Grease-Slime'); - group: 'Slime Tests' with: #('Grease-Tests-Slime') ] \ No newline at end of file + with: [ spec requires: #('Grease-Tests-Squeak-Core') ] ] \ No newline at end of file diff --git a/repository/BaselineOfGrease.package/BaselineOfGrease.class/properties.json b/repository/BaselineOfGrease.package/BaselineOfGrease.class/properties.json index 8a39c621..0260395f 100644 --- a/repository/BaselineOfGrease.package/BaselineOfGrease.class/properties.json +++ b/repository/BaselineOfGrease.package/BaselineOfGrease.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "BaselineOfGrease", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "BaselineOfGrease", - "pools" : [ - ], "super" : "BaselineOf", - "type" : "normal" } + "category" : "BaselineOfGrease", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "BaselineOfGrease", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/BaselineOfGrease.package/monticello.meta/categories.st b/repository/BaselineOfGrease.package/monticello.meta/categories.st index 4a7c5b2b..95bd9e83 100644 --- a/repository/BaselineOfGrease.package/monticello.meta/categories.st +++ b/repository/BaselineOfGrease.package/monticello.meta/categories.st @@ -1,2 +1 @@ -SystemOrganization addCategory: #BaselineOfGrease! -SystemOrganization addCategory: #'BaselineOfGrease-Manifest'! +self packageOrganizer ensurePackage: #BaselineOfGrease withTags: #('Manifest')! diff --git a/repository/BaselineOfGrease.package/properties.json b/repository/BaselineOfGrease.package/properties.json index f037444a..6f31cf5a 100644 --- a/repository/BaselineOfGrease.package/properties.json +++ b/repository/BaselineOfGrease.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/compile.in..st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/compile.in..st index b03bce12..cb2577d5 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/compile.in..st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/compile.in..st @@ -1,3 +1,7 @@ accessing-code compile: aString in: aClass - ^ aClass compile: aString classified: #(accessing) \ No newline at end of file + + GRPlatform current + compile: aString + into: aClass + classified: #accessing \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st index 17204f23..9769e83e 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st @@ -1,13 +1,4 @@ accessing-code defineClass: aClassSymbol superclass: aSuperSymbol - | class | - model defineClass: aSuperSymbol , ' subclass: #' , aClassSymbol , ' - instanceVariableNames: '''' - classVariableNames: '''' - poolDictionaries: '''' - category: ''' , self category , ''''. - class := model classNamed: aClassSymbol. - environment - addClass: class; - addClass: class theMetaClass. - ^ class \ No newline at end of file + "For compatibility" + ^ self defineSubClassOf: aSuperSymbol \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineSubClassOf..st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineSubClassOf..st new file mode 100644 index 00000000..4921f353 --- /dev/null +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineSubClassOf..st @@ -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 theMetaClass. + ^ class \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/setUp.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/setUp.st index 0e7cc221..ee5004c0 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/setUp.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/setUp.st @@ -1,5 +1,6 @@ running setUp super setUp. + factory := ClassFactoryForTestCase new. model := RBNamespace new. environment := RBClassEnvironment new \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/tearDown.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/tearDown.st index f0cb9be4..82f6aabd 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/tearDown.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/tearDown.st @@ -1,7 +1,5 @@ running tearDown + super tearDown. - (Smalltalk organization listAtCategoryNamed: self category) do:[ :e | - SmalltalkImage current removeClassNamed: e ]. - Smalltalk organization - removeCategory: self category \ No newline at end of file + factory cleanUp \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiBooleansRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiBooleansRule.st index 7f500fce..d4560588 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiBooleansRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiBooleansRule.st @@ -1,9 +1,7 @@ tests-transform testAnsiBooleansRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + 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 diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiCharacterRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiCharacterRule.st index 192f1f82..f8d58d84 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiCharacterRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiCharacterRule.st @@ -1,9 +1,7 @@ tests-transform testAnsiCharacterRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'character Character value: 123' in: class. self compile: 'characterRange $a to: $c' in: class. self diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiCollectionsRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiCollectionsRule.st index 21f66b65..8b101581 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiCollectionsRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiCollectionsRule.st @@ -1,9 +1,7 @@ tests-transform testAnsiCollectionsRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'withIndexDo #() withIndexDo: [ :each :index | each + index ]' in: class. self compile: 'doWithIndex #() doWithIndex: [ :each :index | each + index ]' in: class. self compile: 'collectThenDo #() collect: [ :a | a ] thenDo: [ :b | b ]' in: class. diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiConditionalsRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiConditionalsRule.st index 0819b8e6..e1ac638b 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiConditionalsRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiConditionalsRule.st @@ -1,9 +1,7 @@ tests-transform testAnsiConditionalsRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'ifNotNil 1 ifNotNil: [ | a | self or. self and ]' in: class. self compile: 'ifNotNilDo 1 ifNotNilDo: [ :a | ^ a ]' in: class. self diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiConvertorRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiConvertorRule.st index b51f8a3c..898f4f52 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiConvertorRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiConvertorRule.st @@ -1,9 +1,7 @@ tests-transform testAnsiConvertorRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'convertInteger ''1'' asInteger' in: class. self compile: 'convertString 2 asString' in: class. self diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiExceptionsRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiExceptionsRule.st index 61cd5cd8..7232e149 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiExceptionsRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiExceptionsRule.st @@ -1,9 +1,7 @@ tests-transform testAnsiExceptionsRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'exception1 [ self or ] on: Error do: [ self or ]' in: class. self compile: 'exception2 [ self or ] on: Error do: [ self or. self or ]' in: class. self compile: 'exception3 [ self or ] on: Error do: [ | a | a := 0 ]' in: class. diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiStreamsRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiStreamsRule.st index d57fbb32..5f1430b1 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiStreamsRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiStreamsRule.st @@ -1,9 +1,7 @@ tests-transform testAnsiStreamsRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'writeStream ^ '''' writeStream' in: class. self compile: 'writeCr | stream | stream := WriteStream on: ''''. stream cr. stream nextPut: Character cr' in: class. self compile: 'writeLf | stream | stream := WriteStream on: ''''. stream lf. stream nextPut: Character lf' in: class. diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiStringsRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiStringsRule.st index 73f65771..dde1cae1 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiStringsRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testAnsiStringsRule.st @@ -1,9 +1,7 @@ tests-transform testAnsiStringsRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'stringCr String cr, (String with: Character cr)' in: class. self compile: 'stringTab String tab, (String with: Character tab)' in: class. self compile: 'stringLf String lf, (String with: Character lf)' in: class. diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testBasicNewInitializeMissing.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testBasicNewInitializeMissing.st index 137714dd..07bf2a45 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testBasicNewInitializeMissing.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testBasicNewInitializeMissing.st @@ -1,9 +1,7 @@ tests-block testBasicNewInitializeMissing | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #Object. + class := self defineSubClassOf: #Object. self compile: 'initialize' in: class. self runRule: GRBasicNewInitializeMissingRule diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testBlockFormatting.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testBlockFormatting.st index b29f187f..21cb487d 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testBlockFormatting.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testBlockFormatting.st @@ -1,30 +1,28 @@ tests-parsetree testBlockFormatting | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - class + class := self defineSubClassOf: #GRObject. + 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) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testDeprecatedApiProtocol.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testDeprecatedApiProtocol.st index 32f2b682..5735b56e 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testDeprecatedApiProtocol.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testDeprecatedApiProtocol.st @@ -1,11 +1,9 @@ tests-block testDeprecatedApiProtocol | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - self compile: 'deprecated1 self greaseDeprecatedApi: ''GRSlimeMockObject>>#deprecated1'' details: ''Something.''' in: class. - self compile: 'deprecated2 self greaseDeprecatedApi: ''GRSlimeMockObject>>#deprecated'' details: ''Something.''' in: class. + class := self defineSubClassOf: #GRObject. + self compile: 'deprecated1 self greaseDeprecatedApi: ''',class name,'>>#deprecated1'' details: ''Something.''' in: class. + self compile: 'deprecated2 self greaseDeprecatedApi: ''',class name,'>>#deprecated'' details: ''Something.''' in: class. self compile: 'deprecated3 self greaseDeprecatedApi: ''GRSlimeMock>>#deprecated3'' details: ''Something.''' in: class. self runRule: GRDeprecatedApiProtocolRule diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testEmptyStatements.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testEmptyStatements.st index 2db3ea85..e4b03969 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testEmptyStatements.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testEmptyStatements.st @@ -1,9 +1,7 @@ tests-block testEmptyStatements | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + 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. diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testInvalidObjectInitialization.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testInvalidObjectInitialization.st index a3ad223e..f11fb191 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testInvalidObjectInitialization.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testInvalidObjectInitialization.st @@ -1,9 +1,7 @@ tests-block testInvalidObjectInitialization | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'initializeFoo: aNumber' in: class. self runRule: GRInvalidObjectInitializationRule diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNonPortableMessageRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNonPortableMessageRule.st index 6deafde9..b9254341 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNonPortableMessageRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNonPortableMessageRule.st @@ -1,9 +1,7 @@ tests-block testNonPortableMessageRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'invalid1 ^ Array new anyOne' in: class. self compile: 'valid1 ^ Array new first' in: class. diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNonPortableSourceFormat.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNonPortableSourceFormat.st index 7fd6ab30..cad8fe0b 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNonPortableSourceFormat.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNonPortableSourceFormat.st @@ -1,9 +1,7 @@ tests-block testNonPortableSourceFormat | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'invalid ^ ''Unicode snow man', (String with: (Character codePoint: 16r2603)) , '''' in: class. self compile: 'valid ^ ''everything is fine''' in: class. self diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNotPortableCollectionsRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNotPortableCollectionsRule.st index a0977f60..039b45c2 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNotPortableCollectionsRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNotPortableCollectionsRule.st @@ -1,9 +1,7 @@ tests-transform testNotPortableCollectionsRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'beginsWith1 ''abc'' beginsWith: ''a''' in: class. self compile: 'endsWith1 ''abc'' endsWith: ''a''' in: class. self diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testObjectIn.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testObjectIn.st index 7773b660..5aec1103 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testObjectIn.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testObjectIn.st @@ -1,9 +1,7 @@ tests-transform testObjectIn | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'objectIn1 1 in: [ :val | val factorial ]' in: class. self compile: 'objectIn2 2 in: [ :val | | temps | val factorial ]' in: class. self compile: 'objectIn3 2 in: [ ''not this'' ]' in: class. diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testParensFormatting.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testParensFormatting.st index 4f64398f..a632b605 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testParensFormatting.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testParensFormatting.st @@ -1,17 +1,15 @@ tests-parsetree testParensFormatting | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - class + class := self defineSubClassOf: #GRObject. + 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) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testReturnFormatting.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testReturnFormatting.st index e9b3d738..27d8438d 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testReturnFormatting.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testReturnFormatting.st @@ -1,17 +1,15 @@ tests-parsetree testReturnFormatting | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - class + class := self defineSubClassOf: #GRObject. + self compile: 'invalid1 ^1' - classified: #(accessing). - class + in: class. + self compile: 'invalid2 ^ 2' - classified: #(accessing). + in: class. self runRule: GRReturnFormattingRule selectors: #(invalid1 invalid2) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testTempsFormatting.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testTempsFormatting.st index e8a4bb58..2eddb2b4 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testTempsFormatting.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testTempsFormatting.st @@ -1,21 +1,19 @@ tests-parsetree testTempsFormatting | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - class + class := self defineSubClassOf: #GRObject. + 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) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testTestCaseFailRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testTestCaseFailRule.st index 987fa755..a4800822 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testTestCaseFailRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testTestCaseFailRule.st @@ -1,9 +1,7 @@ tests-transform testTestCaseFailRule | class | - class := self - defineClass: #GRSlimeMockObjectTest - superclass: #TestCase. + class := self defineSubClassOf: #TestCase. self compile: 'testMethod self fail' in: class. self runTransformation: GRTestAssertionsRule diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUnnecessaryLastPeriodRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUnnecessaryLastPeriodRule.st index 71a76406..b96f1b62 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUnnecessaryLastPeriodRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUnnecessaryLastPeriodRule.st @@ -1,9 +1,7 @@ tests-block testUnnecessaryLastPeriodRule | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'invalid 1. 2.' in: class. self compile: 'valid 1. 2' in: class. self diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesCanPerformOrUnderstand.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesCanPerformOrUnderstand.st index 38c04498..a29a53fb 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesCanPerformOrUnderstand.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesCanPerformOrUnderstand.st @@ -1,21 +1,19 @@ tests-parsetree testUsesCanPerformOrUnderstand | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - class + class := self defineSubClassOf: #GRObject. + 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) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesClassForHash.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesClassForHash.st index d61b8eb0..e95c920c 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesClassForHash.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesClassForHash.st @@ -1,17 +1,15 @@ tests-parsetree testUsesClassForHash | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - class + class := self defineSubClassOf: #GRObject. + 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) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesCurlyBraceArrays.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesCurlyBraceArrays.st index 61084706..7e341c1e 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesCurlyBraceArrays.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesCurlyBraceArrays.st @@ -3,17 +3,15 @@ testUsesCurlyBraceArrays | class | (self canParse: 'foo { self foo. self bar }') ifFalse: [ ^ self ]. - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - class + class := self defineSubClassOf: #GRObject. + 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) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesLiteralByteArrays.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesLiteralByteArrays.st index 556f4d77..342eb995 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesLiteralByteArrays.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesLiteralByteArrays.st @@ -3,17 +3,15 @@ testUsesLiteralByteArrays | class | (self canParse: 'foo #[ 1 2 3 ]') ifFalse: [ ^ self ]. - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. - class + class := self defineSubClassOf: #GRObject. + 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) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesMethodAnnotations.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesMethodAnnotations.st index 39519d9b..dd1e7931 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesMethodAnnotations.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesMethodAnnotations.st @@ -3,9 +3,7 @@ testUsesMethodAnnotations | class | (self canParse: 'foo ') ifFalse: [ ^ self ]. - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'invalid ' in: class. self compile: 'valid' in: class. self diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesNotPortableClass.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesNotPortableClass.st index a4945bb4..d988a2fd 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesNotPortableClass.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesNotPortableClass.st @@ -1,9 +1,7 @@ tests-block testUsesNotPortableClass | class | - class := self - defineClass: #GRSlimeMockObject - superclass: #GRObject. + class := self defineSubClassOf: #GRObject. self compile: 'invalid ^ Semaphore new' in: class. self compile: 'valid ^ GRObject new' in: class. self diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/properties.json b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/properties.json index e01b8a06..b2e89aff 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/properties.json +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/properties.json @@ -7,7 +7,8 @@ "classvars" : [ ], "instvars" : [ "model", - "environment" + "environment", + "factory" ], "name" : "GRSlimeTest", "type" : "normal" diff --git a/repository/Grease-Tests-Slime.package/monticello.meta/categories.st b/repository/Grease-Tests-Slime.package/monticello.meta/categories.st index d34cfb4a..a49916c2 100644 --- a/repository/Grease-Tests-Slime.package/monticello.meta/categories.st +++ b/repository/Grease-Tests-Slime.package/monticello.meta/categories.st @@ -1 +1 @@ -SystemOrganization addCategory: #'Grease-Tests-Slime'! +self packageOrganizer ensurePackage: #'Grease-Tests-Slime' withTags: #()!