-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f80446d
commit 4fda0a9
Showing
286 changed files
with
2,115 additions
and
0 deletions.
There are no files selected for viewing
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,5 @@ | ||
{ | ||
"separateMethodMetaAndSource" : false, | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
Empty file.
18 changes: 18 additions & 0 deletions
18
BaselineOfObjectStatistics.package/BaselineOfObjectStatistics.class/instance/baseline..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,18 @@ | ||
baselines | ||
baseline: spec | ||
<baseline> | ||
spec for: #'common' do: [ | ||
spec baseline: 'StateSpecs' with: [ | ||
spec | ||
repository: 'github://dionisiydk/StateSpecs:v2.4.x'; | ||
loads: 'Core' ]. | ||
spec baseline: 'Mocketry' with: [ | ||
spec repository: 'github://dionisiydk/Mocketry:v4.0.x' ]. | ||
spec | ||
package: 'ObjectStatistics' with: [spec requires: #('StateSpecs')]; | ||
package: 'ObjectStatistics-Tests' with: [spec requires: #('ObjectStatistics' 'Mocketry')]; | ||
package: 'ObjectStatistics-GTTools' with: [spec requires: #('ObjectStatistics')]. | ||
spec | ||
group: 'default' with: #('Core' 'ObjectStatistics-GTTools' 'Tests'); | ||
group: 'Core' with: #('ObjectStatistics'); | ||
group: 'Tests' with: #('ObjectStatistics-Tests') ] |
11 changes: 11 additions & 0 deletions
11
BaselineOfObjectStatistics.package/BaselineOfObjectStatistics.class/properties.json
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,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "BaselineOf", | ||
"category" : "BaselineOfObjectStatistics", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "BaselineOfObjectStatistics", | ||
"type" : "normal" | ||
} |
1 change: 1 addition & 0 deletions
1
BaselineOfObjectStatistics.package/monticello.meta/categories.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 @@ | ||
SystemOrganization addCategory: #BaselineOfObjectStatistics! |
Empty file.
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 @@ | ||
(name 'BaselineOfObjectStatistics') |
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 @@ | ||
{ } |
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,5 @@ | ||
{ | ||
"separateMethodMetaAndSource" : false, | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
4 changes: 4 additions & 0 deletions
4
...tistics-GTTools.package/ObjectStatDimension.extension/instance/gtInspectorItemsTreeIn..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,4 @@ | ||
*ObjectStatistics-GTTools | ||
gtInspectorItemsTreeIn: composite | ||
<gtInspectorPresentationOrder: 1> | ||
ObjectStatistics buildInspectorMetricsTreeIn: composite |
3 changes: 3 additions & 0 deletions
3
...ctStatistics-GTTools.package/ObjectStatDimension.extension/instance/inspectorTreeItems.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,3 @@ | ||
*ObjectStatistics-GTTools | ||
inspectorTreeItems | ||
^self sortedSlices |
3 changes: 3 additions & 0 deletions
3
ObjectStatistics-GTTools.package/ObjectStatDimension.extension/properties.json
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,3 @@ | ||
{ | ||
"name" : "ObjectStatDimension" | ||
} |
4 changes: 4 additions & 0 deletions
4
...tStatistics-GTTools.package/ObjectStatSlice.extension/instance/gtInspectorItemsTreeIn..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,4 @@ | ||
*ObjectStatistics-GTTools | ||
gtInspectorItemsTreeIn: composite | ||
<gtInspectorPresentationOrder: 1> | ||
statistics gtInspectorItemsTreeIn: composite |
3 changes: 3 additions & 0 deletions
3
ObjectStatistics-GTTools.package/ObjectStatSlice.extension/instance/inspectorTreeItems.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,3 @@ | ||
*ObjectStatistics-GTTools | ||
inspectorTreeItems | ||
^statistics inspectorTreeItems |
3 changes: 3 additions & 0 deletions
3
ObjectStatistics-GTTools.package/ObjectStatSlice.extension/properties.json
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,3 @@ | ||
{ | ||
"name" : "ObjectStatSlice" | ||
} |
11 changes: 11 additions & 0 deletions
11
...atistics-GTTools.package/ObjectStatistics.extension/class/buildInspectorMetricsTreeIn..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,11 @@ | ||
*ObjectStatistics-GTTools | ||
buildInspectorMetricsTreeIn: composite | ||
| tree | | ||
tree := composite tree | ||
title: 'Metrics'; | ||
allowsRecursiveSearch: true; | ||
" shouldExpandToLevel: 0;" | ||
|
||
children: [ :receiver | receiver inspectorTreeItems]. | ||
self expandInspectorTree: tree. | ||
^tree |
4 changes: 4 additions & 0 deletions
4
ObjectStatistics-GTTools.package/ObjectStatistics.extension/class/expandInspectorTree..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,4 @@ | ||
*ObjectStatistics-GTTools | ||
expandInspectorTree: tree | ||
tree rootsExpanded. | ||
tree allExpanded |
5 changes: 5 additions & 0 deletions
5
...Statistics-GTTools.package/ObjectStatistics.extension/instance/gtInspectorItemsTreeIn..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,5 @@ | ||
*ObjectStatistics-GTTools | ||
gtInspectorItemsTreeIn: composite | ||
<gtInspectorPresentationOrder: 1> | ||
|
||
self class buildInspectorMetricsTreeIn: composite |
5 changes: 5 additions & 0 deletions
5
ObjectStatistics-GTTools.package/ObjectStatistics.extension/instance/inspectorTreeItems.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,5 @@ | ||
*ObjectStatistics-GTTools | ||
inspectorTreeItems | ||
dimensions size = 1 ifTrue: [ ^dimensions first inspectorTreeItems ]. | ||
|
||
^dimensions reject: #isEmpty |
3 changes: 3 additions & 0 deletions
3
ObjectStatistics-GTTools.package/ObjectStatistics.extension/properties.json
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,3 @@ | ||
{ | ||
"name" : "ObjectStatistics" | ||
} |
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 @@ | ||
SystemOrganization addCategory: #'ObjectStatistics-GTTools'! |
Empty file.
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 @@ | ||
(name 'ObjectStatistics-GTTools') |
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 @@ | ||
{ } |
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,5 @@ | ||
{ | ||
"separateMethodMetaAndSource" : false, | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
Empty file.
8 changes: 8 additions & 0 deletions
8
ObjectStatistics-Tests.package/ObjectStatCounterTests.class/instance/testMeasureObjects.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,8 @@ | ||
tests | ||
testMeasureObjects | ||
|
||
| counter | | ||
counter := ObjectStatCounter new. | ||
|
||
(counter measure: Any) should be: 1. | ||
(counter measure: Any) should be: 1 |
11 changes: 11 additions & 0 deletions
11
ObjectStatistics-Tests.package/ObjectStatCounterTests.class/properties.json
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,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "TestCase", | ||
"category" : "ObjectStatistics-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "ObjectStatCounterTests", | ||
"type" : "normal" | ||
} |
Empty file.
10 changes: 10 additions & 0 deletions
10
...ctStatDifferentPropertiesCounterTests.class/instance/testCreationNewMetricForDimension.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,10 @@ | ||
tests | ||
testCreationNewMetricForDimension | ||
|
||
| metric actual | | ||
metric := ObjectStatDifferentPropertiesCounter for: [:o | o first]. | ||
|
||
actual := metric newForDimension. | ||
|
||
actual should beInstanceOf: metric class. | ||
actual measuredProperties should not be: metric measuredProperties |
9 changes: 9 additions & 0 deletions
9
...ts.package/ObjectStatDifferentPropertiesCounterTests.class/instance/testMeasureObjects.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,9 @@ | ||
tests | ||
testMeasureObjects | ||
|
||
| counter | | ||
counter := ObjectStatDifferentPropertiesCounter for: [:o | o first] . | ||
|
||
(counter measure: #(#object)) should be: 1. | ||
(counter measure: #(#object) copy) should be: 0. | ||
(counter measure: #(#object2)) should be: 1 |
8 changes: 8 additions & 0 deletions
8
...ferentPropertiesCounterTests.class/instance/testMeasureObjectsWhenPropertyIsCollection.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,8 @@ | ||
tests | ||
testMeasureObjectsWhenPropertyIsCollection | ||
|
||
| counter | | ||
counter := ObjectStatDifferentPropertiesCounter for: [:o | o first] . | ||
|
||
(counter measure: #(#object)) should be: 1. | ||
(counter measure: #(#(#object #object2 #object3)) copy) should be: 2. |
11 changes: 11 additions & 0 deletions
11
...tStatistics-Tests.package/ObjectStatDifferentPropertiesCounterTests.class/properties.json
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,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "TestCase", | ||
"category" : "ObjectStatistics-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "ObjectStatDifferentPropertiesCounterTests", | ||
"type" : "normal" | ||
} |
Empty file.
11 changes: 11 additions & 0 deletions
11
...ics-Tests.package/ObjectStatDimensionTests.class/instance/testCheckThatMetricIsIgnored.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,11 @@ | ||
tests | ||
testCheckThatMetricIsIgnored | ||
|
||
| dimension | | ||
dimension := ObjectStatDimension new. | ||
dimension ignoreMetrics: #('metric1Name' 'metric2Name'). | ||
|
||
dimension should be isIgnoreMetric: (ObjectStatMetric named: 'metric1Name'). | ||
dimension should be isIgnoreMetric: (ObjectStatMetric named: 'metric2Name'). | ||
|
||
dimension should not be isIgnoreMetric: (ObjectStatMetric named: 'someOtherMetric') |
7 changes: 7 additions & 0 deletions
7
...istics-Tests.package/ObjectStatDimensionTests.class/instance/testConvertingToDimension.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,7 @@ | ||
tests | ||
testConvertingToDimension | ||
|
||
| dimension | | ||
dimension := ObjectStatDimension new. | ||
|
||
dimension where asObjectStatDimension should be: dimension |
13 changes: 13 additions & 0 deletions
13
...atistics-Tests.package/ObjectStatDimensionTests.class/instance/testCopyForSubDimension.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,13 @@ | ||
tests | ||
testCopyForSubDimension | ||
|
||
| dimension copy | | ||
dimension := ObjectStatDimension named: 'test dim'. | ||
dimension slices: #currentSlices. | ||
|
||
copy := dimension copyForSubDimension. | ||
|
||
copy should beInstanceOf: ObjectStatDimension. | ||
copy name should equal: 'test dim'. | ||
copy slices should not be: dimension slices. | ||
copy slices should beInstanceOf: Dictionary |
17 changes: 17 additions & 0 deletions
17
...atistics-Tests.package/ObjectStatDimensionTests.class/instance/testGettingSortedSlices.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,17 @@ | ||
tests | ||
testGettingSortedSlices | ||
|
||
| dimension actual stat | | ||
stat := ObjectStatistics new. | ||
stat countAllAs: 'strings'. | ||
dimension := [:o | o size] asObjectStatDimension. | ||
dimension overallStatistics: stat. | ||
|
||
dimension accumulateAll: #('asd' 'qwe' 'a' 'b' 'c' '1234'). | ||
|
||
actual := dimension sortedSlices. | ||
|
||
actual should haveSize: 3. | ||
actual where first coordinate should be: 1. | ||
actual where second coordinate should be: 3. | ||
actual where last coordinate should be: 4. |
7 changes: 7 additions & 0 deletions
7
...s-Tests.package/ObjectStatDimensionTests.class/instance/testHasAnyObjectsSpecByDefault.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,7 @@ | ||
tests | ||
testHasAnyObjectsSpecByDefault | ||
|
||
| dimension | | ||
dimension := ObjectStatDimension new. | ||
|
||
(dimension objectsSpec == Any) should be: true |
7 changes: 7 additions & 0 deletions
7
...tics-Tests.package/ObjectStatDimensionTests.class/instance/testHasEmptySlicesByDefault.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,7 @@ | ||
tests | ||
testHasEmptySlicesByDefault | ||
|
||
| dimension | | ||
dimension := ObjectStatDimension new. | ||
|
||
dimension where slices should be isEmpty |
7 changes: 7 additions & 0 deletions
7
...sts.package/ObjectStatDimensionTests.class/instance/testHasEmptySubDimensionsByDefault.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,7 @@ | ||
tests | ||
testHasEmptySubDimensionsByDefault | ||
|
||
| dimension | | ||
dimension := ObjectStatDimension new. | ||
|
||
dimension where subDimensions should be isEmpty |
13 changes: 13 additions & 0 deletions
13
...sionTests.class/instance/testObjectsAccumulationShouldSkipObjectsWhichNotSatisfiedSpec.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,13 @@ | ||
tests | ||
testObjectsAccumulationShouldSkipObjectsWhichNotSatisfiedSpec | ||
|
||
| dimension slice | | ||
slice := Mock new. | ||
dimension := ObjectStatDimension by: [ :each | #sliceCoordinate ]. | ||
dimension objectsSpec: [ :o | o ~= #object ]. | ||
|
||
dimension slices at: #sliceCoordinate put: slice. | ||
|
||
dimension accumulate: #object. | ||
|
||
slice should not receive accumulate: #object |
15 changes: 15 additions & 0 deletions
15
...ckage/ObjectStatDimensionTests.class/instance/testObjectsAccumulationWhenNoSlicesExist.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,15 @@ | ||
tests | ||
testObjectsAccumulationWhenNoSlicesExist | ||
|
||
| dimension overallStat slice | | ||
overallStat := Mock new. | ||
dimension := ObjectStatDimension by: [ :each | #sliceCoordinate ]. | ||
dimension overallStatistics: overallStat. | ||
|
||
dimension accumulate: #object. | ||
|
||
slice := dimension sliceFor: #sliceCoordinate. | ||
slice should beInstanceOf: ObjectStatSlice. | ||
slice coordinate should be: #sliceCoordinate. | ||
slice statistics should beReturnedFrom: [overallStat newForDimension: dimension]. | ||
slice statistics should receive accumulate: #object |
12 changes: 12 additions & 0 deletions
12
...ctStatDimensionTests.class/instance/testObjectsAccumulationWhenSliceAlreadyExistsForIt.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,12 @@ | ||
tests | ||
testObjectsAccumulationWhenSliceAlreadyExistsForIt | ||
|
||
| dimension slice | | ||
slice := Mock new. | ||
dimension := ObjectStatDimension by: [ :each | #sliceCoordinate ]. | ||
|
||
dimension slices at: #sliceCoordinate put: slice. | ||
|
||
dimension accumulate: #object. | ||
|
||
slice should receive accumulate: #object |
15 changes: 15 additions & 0 deletions
15
...atistics-Tests.package/ObjectStatDimensionTests.class/instance/testPreparingStatistics.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,15 @@ | ||
tests | ||
testPreparingStatistics | ||
|
||
| dimension | | ||
[:subDimension1 :subDimension2 :stat | | ||
dimension := ObjectStatDimension new. | ||
dimension subDimensions: { subDimension1. subDimension2 }. | ||
subDimension1 stub copyForSubDimension willReturn: #newDim1. | ||
subDimension2 stub copyForSubDimension willReturn: #newDim2. | ||
|
||
dimension prepareStatistics: stat. | ||
|
||
stat should receive addDimension: #newDim1. | ||
stat should receive addDimension: #newDim2. | ||
] runWithMocks |
11 changes: 11 additions & 0 deletions
11
ObjectStatistics-Tests.package/ObjectStatDimensionTests.class/properties.json
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,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "TestCase", | ||
"category" : "ObjectStatistics-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "ObjectStatDimensionTests", | ||
"type" : "normal" | ||
} |
Empty file.
10 changes: 10 additions & 0 deletions
10
...ics-Tests.package/ObjectStatFunctionalMetricTests.class/instance/testCreationFromBlock.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,10 @@ | ||
tests | ||
testCreationFromBlock | ||
|
||
| metric block | | ||
block := [ :o | ]. | ||
|
||
metric := block asObjectStatMetric. | ||
|
||
metric should beInstanceOf: ObjectStatFunctionMetric. | ||
metric functionBlock should be: block |
12 changes: 12 additions & 0 deletions
12
...istics-Tests.package/ObjectStatFunctionalMetricTests.class/instance/testMeasureObjects.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,12 @@ | ||
tests | ||
testMeasureObjects | ||
|
||
| object metric actual | | ||
object := Mock new. | ||
object stub someMetric willReturn: #result. | ||
|
||
metric := [ :o | o someMetric ] asObjectStatMetric. | ||
|
||
actual := metric measure: object. | ||
|
||
actual should be: #result. |
Oops, something went wrong.