-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #909 from hernanmd/p13-new-finder-integration
New Finder integration
- Loading branch information
Showing
16 changed files
with
201 additions
and
4 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,6 @@ | ||
Extension { #name : 'Boolean' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Boolean class >> approvedSelectorsForMethodFinder [ | ||
^ self selectors | ||
] |
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 @@ | ||
Extension { #name : 'ByteString' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
ByteString class >> allSelectorsToTestInMethodFinderWithArity: anInteger [ | ||
"Returns all the selectors with a certain arity which are approved by the class so which can be tested in the Method Finder." | ||
|
||
^ self allSelectorsToTestInMethodFinder select: [ :selector | selector numArgs = anInteger ] | ||
] |
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,33 @@ | ||
Extension { #name : 'ClassDescription' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
ClassDescription >> allSelectorsToTestInMethodFinder [ | ||
"Returns all the selectors that the class approved, so which can be tested by the MethodFinder without problem. This set is the set of selectors that the class approved plus all the selectors approved by its superclass unless if they are forbidden by the class." | ||
|
||
^ (self approvedSelectorsForMethodFinder union: self superclass allSelectorsToTestInMethodFinder) | ||
difference: self forbiddenSelectorsForMethodFinder asSet | ||
] | ||
|
||
{ #category : '*NewTools-Finder' } | ||
ClassDescription >> allSelectorsToTestInMethodFinderWithArity: anInteger [ | ||
"Returns all the selectors with a certain arity which are approved by the class so which can be tested in the Method Finder." | ||
|
||
^ self allSelectorsToTestInMethodFinder select: [ :selector | selector numArgs = anInteger ] | ||
] | ||
|
||
{ #category : '*NewTools-Finder' } | ||
ClassDescription >> approvedSelectorsForMethodFinder [ | ||
"The list of the selectors that the class approved. It's empty by default. | ||
An approved selector is a selector where the message send to the class could be | ||
tested by the Method Finder without problem. For instance, it does not modify | ||
the environment and it does not touch to a globalvariable ." | ||
|
||
^ #(isNil) | ||
] | ||
|
||
{ #category : '*NewTools-Finder' } | ||
ClassDescription >> forbiddenSelectorsForMethodFinder [ | ||
"The list of selector forbidden by the class. A forbidden selector will not be tested by the Method Finder. So, a forbiden selector could be a method which modifies the environment, a global variable, etc." | ||
|
||
^ #() | ||
] |
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 @@ | ||
Extension { #name : 'Collection' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Collection class >> approvedSelectorsForMethodFinder [ | ||
^ self selectors | ||
] | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Collection class >> forbiddenSelectorsForMethodFinder [ | ||
|
||
^ #( #combinations ) | ||
] |
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,6 @@ | ||
Extension { #name : 'Color' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Color class >> approvedSelectorsForMethodFinder [ | ||
^ self selectors | ||
] |
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 @@ | ||
Extension { #name : 'Integer' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Integer class >> forbiddenSelectorsForMethodFinder [ | ||
|
||
^ #(#benchFib #tinyBenchmarks) | ||
] |
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,6 @@ | ||
Extension { #name : 'Magnitude' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Magnitude class >> approvedSelectorsForMethodFinder [ | ||
^ self selectors | ||
] |
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,6 @@ | ||
Extension { #name : 'Margin' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Margin class >> approvedSelectorsForMethodFinder [ | ||
^ self selectors | ||
] |
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 @@ | ||
Extension { #name : 'Object' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Object class >> approvedSelectorsForMethodFinder [ | ||
|
||
^ #(at: basicAt: basicSize yourself size | ||
-> | ||
= == ~= hash literalEqual | ||
) | ||
] |
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 @@ | ||
Extension { #name : 'Point' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Point class >> approvedSelectorsForMethodFinder [ | ||
|
||
^ self selectors | ||
] |
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 @@ | ||
Extension { #name : 'ProtoObject' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
ProtoObject >> allSelectorsToTestInMethodFinder [ | ||
|
||
^ #() | ||
] |
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 @@ | ||
Extension { #name : 'Rectangle' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Rectangle class >> approvedSelectorsForMethodFinder [ | ||
|
||
^ self selectors | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : 'Symbol' } | ||
|
||
{ #category : '*NewTools-Finder' } | ||
Symbol class >> forbiddenSelectorsForMethodFinder [ | ||
|
||
^ super forbiddenSelectorsForMethodFinder , #( string: #privateAt:put: ) | ||
] |
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