Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #listAtCategoryNamed: has been deprecated in Pharo 12 #606

Merged
merged 7 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ addLoadedClassesFrom: aDefinitionsCollection
| mcOrganization classes |
mcOrganization := aDefinitionsCollection detect: [ :def | def isOrganizationDefinition ].
mcOrganization ifNil: [ self error: 'Could not find MCOrganizationDefinition' ].
classes := SmalltalkCI classesWithCategoryNames: mcOrganization categories.
self loadedClasses addAll: classes
classes := SmalltalkCI platformClass classesWithCategoryNames: mcOrganization categories.
self loadedClasses addAll: classes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class organization
classesInCategory: aCategory
^ (Smalltalk organization tagForCategory: aCategory)
ifNotNil: [ :tag |
tag classNames collect: [ :className | Smalltalk at: className ] ]
ifNil: [ #() ]
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ testAddLoadedClassesFrom
| mcOrganization |
self assert: true equals: (self spec loadedClasses isEmpty).

mcOrganization := MCOrganizationDefinition categories: #('SmalltalkCI-Core' 'SmalltalkCI-Tests').
mcOrganization := (MCOrganizationDefinition canUnderstand: #categories:)
ifTrue: [
"Squeak, Pharo < 12"
MCOrganizationDefinition categories: #('SmalltalkCI-Core' 'SmalltalkCI-Tests') ]
ifFalse: [
MCOrganizationDefinition
packageName: 'SmalltalkCI'
tagNames: #(Core Tests) ].

self spec addLoadedClassesFrom: {mcOrganization}.
self deny: (self spec loadedClasses isEmpty).
self assert: (self spec loadedClasses includes: SmalltalkCI).
self assert: (self spec loadedClasses includes: SmalltalkCITest).
self assert: (self spec loadedClasses includes: SmalltalkCITest).
Loading