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

New test filters #82

Merged
merged 12 commits into from
Feb 22, 2024
Prev Previous commit
Next Next commit
moved down class methods
Durieux Pol committed Feb 21, 2024
commit 58ced2495770c8ef1b3aeb6aef5c14c147ce8854
18 changes: 18 additions & 0 deletions src/MuTalk-Model/MTPragmaRejectionTestFilter.class.st
Original file line number Diff line number Diff line change
@@ -6,6 +6,24 @@ Class {
#tag : 'Test filters'
}

{ #category : 'instance creation' }
MTPragmaRejectionTestFilter class >> for: aPragmaSelector [

^ self new
condition: aPragmaSelector;
pragmaArguments: #( );
yourself
]

{ #category : 'instance creation' }
MTPragmaRejectionTestFilter class >> for: aPragmaSelector arguments: pragmaArguments [

^ self new
condition: aPragmaSelector;
pragmaArguments: pragmaArguments;
yourself
]

{ #category : 'enumerating' }
MTPragmaRejectionTestFilter >> filterTests: aTestCaseCollection [

18 changes: 18 additions & 0 deletions src/MuTalk-Model/MTPragmaSelectionTestFilter.class.st
Original file line number Diff line number Diff line change
@@ -6,6 +6,24 @@ Class {
#tag : 'Test filters'
}

{ #category : 'instance creation' }
MTPragmaSelectionTestFilter class >> for: aPragmaSelector [

^ self new
condition: aPragmaSelector;
pragmaArguments: #( );
yourself
]

{ #category : 'instance creation' }
MTPragmaSelectionTestFilter class >> for: aPragmaSelector arguments: pragmaArguments [

^ self new
condition: aPragmaSelector;
pragmaArguments: pragmaArguments;
yourself
]

{ #category : 'enumerating' }
MTPragmaSelectionTestFilter >> filterTests: aTestCaseCollection [

22 changes: 5 additions & 17 deletions src/MuTalk-Model/MTPragmaTestFilter.class.st
Original file line number Diff line number Diff line change
@@ -9,22 +9,10 @@ Class {
#tag : 'Test filters'
}

{ #category : 'instance creation' }
MTPragmaTestFilter class >> for: aPragmaSelector [

^ self new
condition: aPragmaSelector;
pragmaArguments: #( );
yourself
]

{ #category : 'instance creation' }
MTPragmaTestFilter class >> for: aPragmaSelector arguments: pragmaArguments [
{ #category : 'testing' }
MTPragmaTestFilter class >> isAbstract [

^ self new
condition: aPragmaSelector;
pragmaArguments: pragmaArguments;
yourself
^ true
]

{ #category : 'enumerating' }
@@ -38,8 +26,8 @@ MTPragmaTestFilter >> isPragmaValidFrom: aTestCaseReference [

| pragmas |
pragmas := aTestCaseReference method pragmas.
pragmas anySatisfy: [ :pragma |
pragma selector = condition & (pragma arguments = pragmaArguments) ]
^ pragmas anySatisfy: [ :pragma |
pragma selector = condition & (pragma arguments = pragmaArguments) ]
]

{ #category : 'accessing' }