-
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.
make class package work across all Pharo versions for generating test…
… classes
- Loading branch information
Showing
5 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
18 changes: 1 addition & 17 deletions
18
...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 |
---|---|---|
@@ -1,20 +1,4 @@ | ||
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 | ||
^ self defineSubClassOf: aSuperSymbol inPackage: self category |
20 changes: 20 additions & 0 deletions
20
...ase-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineSubClassOf.inPackage..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 inPackage: packageName | ||
|
||
| class | | ||
class := SystemVersion current major >= 12 | ||
ifTrue: [ | ||
factory make: [ :aBuilder | | ||
aBuilder | ||
superclass: (Smalltalk at: aSuperSymbol); | ||
package: packageName ] ] | ||
ifFalse: [ | ||
factory | ||
newSubclassOf: (Smalltalk at: aSuperSymbol) | ||
instanceVariableNames: '' | ||
classVariableNames: 'classVarsString' | ||
category: packageName ]. | ||
environment | ||
addClass: class; | ||
addClass: class classSide. | ||
^ class |
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
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