Skip to content

Commit

Permalink
Typo + add comments for creation of a new cleaner.
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Apr 21, 2020
1 parent e15dda3 commit f12483b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
11 changes: 10 additions & 1 deletion src/Chanel-Tests/ChanelAbstractCleanerTest.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
"
A ChanelAbstractCleanerTest is a test class for testing the behavior of ChanelAbstractCleaner
A ChanelAbstractCleanerTest is a test class for testing the behavior of ChanelAbstractCleaner.
List of special cases to take into account when writing a new cleaner (add tests for them):
- Should it apply on classe side?
- Should it apply on traits? In that case, ensure the methods are not duplicated in the user classes
- Ensure extension methods are not moved of protocol
- When rewriting the content of a method: ensure we do not create an infinit loop by calling self
- If it concern only test cases, test on non test cases
- What should happen if the method is empty?
- Be careful of methods with pragmas which can be special cases. (for example, do not remove empty methods with a pragma)
"
Class {
#name : #ChanelAbstractCleanerTest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ChanelMethodsOnlyCallingSuperCleanerTest >> testDoesNotRemoveMethodWithPragma [
]

{ #category : #tests }
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveBinaryMethodOnlyCollingSuper [
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveBinaryMethodOnlyCallingSuper [
class
compile:
'= aString
Expand All @@ -93,7 +93,7 @@ ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveBinaryMethodOnlyCollingSup
]

{ #category : #tests }
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveKeywordMethodOnlyCollingSuper [
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveKeywordMethodOnlyCallingSuper [
class
compile:
'initialize: aString
Expand All @@ -105,7 +105,7 @@ ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveKeywordMethodOnlyCollingSu
]

{ #category : #tests }
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuper [
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCallingSuper [
class
compile:
'initialize
Expand All @@ -117,7 +117,7 @@ ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuper [
]

{ #category : #tests }
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuper2 [
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCallingSuper2 [
class
compile:
'initialize
Expand All @@ -130,7 +130,7 @@ ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuper2 [
]

{ #category : #tests }
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuperEvenIfThereIsAReturn [
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCallingSuperEvenIfThereIsAReturn [
class
compile:
'initialize
Expand All @@ -142,7 +142,7 @@ ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuperEven
]

{ #category : #tests }
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuperInTrait [
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCallingSuperInTrait [
| trait |
trait := self createDefaultTrait.

Expand All @@ -160,7 +160,7 @@ ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuperInTr
]

{ #category : #tests }
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCollingSuperOnClassSide [
ChanelMethodsOnlyCallingSuperCleanerTest >> testRemoveMethodOnlyCallingSuperOnClassSide [
class class
compile:
'initialize
Expand Down

0 comments on commit f12483b

Please sign in to comment.