Skip to content

Commit

Permalink
accelerate running + browsing tests for many objects
Browse files Browse the repository at this point in the history
LinqLover committed Jan 5, 2025
1 parent 3186ccf commit 99b6172
Showing 8 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
children

^ self methods, self variables
^ self methods asArray "optimization", self variables
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"allVariables:" : "MB 6/17/2014 12:47",
"category" : "AT 5/7/2008 21:34",
"categoryName" : "AT 5/7/2008 21:34",
"children" : "topa 1/10/2015 11:32",
"children" : "ct 1/5/2025 03:31",
"classMethodForSelector:" : "AT 5/7/2008 21:34",
"classMethods" : "AT 5/7/2008 21:34",
"classMethods:" : "MB 6/17/2014 12:22",
Original file line number Diff line number Diff line change
@@ -5,4 +5,4 @@ findClassesForSelectedCategories
items := self categoriesSelected gather: [ :category |
((Smalltalk organization listAtCategoryNamed: category)
collect: [ :each | Smalltalk at: each ])].
^ items asOrderedCollection
^ items asSet
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@
"filterClasses" : "ct 12/20/2024 00:14",
"filterTestCategories" : "ct 12/13/2024 05:32",
"filterTests" : "ct 12/20/2024 00:15",
"findClassesForSelectedCategories" : "ct 12/20/2024 00:10",
"findClassesForSelectedCategories" : "ct 1/5/2025 02:49",
"findTestsForSelectedTestCategories" : "ct 12/22/2024 05:06",
"getCategoriesFor:" : "NA 7/17/2015 01:04",
"initialExtent" : "BD 6/17/2018 21:14",
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ updating
fetchAllTestObjects
"Fetches System- and CategoryTestObjects as well as all selected ClassTestObjects "
| allTestObjects |
allTestObjects := OrderedCollection new
allTestObjects := Set new
addAll: (self testEnvironment testSystem children);
add: (self testEnvironment testSystem);
yourself.
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ updating
fetchChildTestObjectsFrom: aSLTestObject

| result |
result := OrderedCollection new.
result := Set new.
result add: aSLTestObject.
aSLTestObject children do: [ :each |
result addAll: (self fetchChildTestObjectsFrom: each)].
Original file line number Diff line number Diff line change
@@ -3,9 +3,10 @@ findClassesForSelectedCategories

| items chosenClasses |
self categoriesSelected isEmpty ifTrue: [ ^ Set new ].
items := self categoriesSelected gather: [ :category |
items := (self categoriesSelected gather: [ :category |
((Smalltalk organization listAtCategoryNamed: (category name))
collect: [ :each | Smalltalk at: each ])].
collect: [ :each | Smalltalk at: each ])])
asSet.
chosenClasses := self testEnvironment classes.
chosenClasses := chosenClasses select: [:each | items includes: each testObject].

Original file line number Diff line number Diff line change
@@ -36,9 +36,9 @@
"classAt:put:" : "NA 7/2/2015 19:29",
"classList" : "NA 7/15/2015 11:18",
"classesFrame" : "BD 6/29/2018 12:53",
"fetchAllTestObjects" : "ct 12/22/2024 05:06",
"fetchChildTestObjectsFrom:" : "BD 7/13/2018 11:50",
"findClassesForSelectedCategories" : "ct 12/22/2024 05:07",
"fetchAllTestObjects" : "ct 1/5/2025 02:52",
"fetchChildTestObjectsFrom:" : "ct 1/5/2025 03:32",
"findClassesForSelectedCategories" : "ct 1/5/2025 02:44",
"findResults" : "ct 12/22/2024 05:07",
"findTestsForSelectedTestCategories" : "ct 12/22/2024 05:08",
"getCategoriesFor:" : "NA 7/21/2015 15:40",

0 comments on commit 99b6172

Please sign in to comment.