-
Notifications
You must be signed in to change notification settings - Fork 14
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 #118 from matburnx/-CI-not-working
CI not working
- Loading branch information
Showing
37 changed files
with
642 additions
and
122 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,31 @@ | ||
Class { | ||
#name : 'MTCIMarkdownExporterTest', | ||
#superclass : 'TestCase', | ||
#category : 'MuTalk-CI-Tests', | ||
#package : 'MuTalk-CI-Tests' | ||
} | ||
|
||
{ #category : 'as yet unclassified' } | ||
MTCIMarkdownExporterTest >> testMarkdownExporter [ | ||
|
||
| analysis md moreInfo | | ||
analysis := MTAnalysis new | ||
testClasses: { MTSmallBankTest }; | ||
classesToMutate: { MTSmallBank }. | ||
analysis run. | ||
analysis generalResult. | ||
moreInfo := MTCoveragePropagationPreparation new | ||
mtResult: analysis; | ||
prepare. | ||
|
||
md := MTCIMarkdownExporter new | ||
mtResult: analysis; | ||
cloneLocation: | ||
FileLocator localDirectory fullName | ||
, '/iceberg/pharo-contributions/mutalk'; | ||
root: 'src'; | ||
export. | ||
|
||
self assert: md isString. | ||
self assert: md isNotEmpty. | ||
] |
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,40 @@ | ||
Class { | ||
#name : 'MTSmallBank', | ||
#superclass : 'Object', | ||
#instVars : [ | ||
'balance' | ||
], | ||
#category : 'MuTalk-CI-Tests', | ||
#package : 'MuTalk-CI-Tests' | ||
} | ||
|
||
{ #category : 'accessing' } | ||
MTSmallBank >> balance [ | ||
^ balance | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTSmallBank >> deposit: amount [ | ||
balance := balance + amount | ||
] | ||
|
||
{ #category : 'initialization' } | ||
MTSmallBank >> initialize [ | ||
balance := 0 | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTSmallBank >> rand [ | ||
" Flaky detection " | ||
^ (1 to: 1000) atRandom | ||
|
||
] | ||
|
||
{ #category : 'accessing' } | ||
MTSmallBank >> withdraw: amount [ | ||
balance >= amount | ||
ifTrue: [ | ||
balance := balance - amount. | ||
^ true ]. | ||
^ false | ||
] |
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,60 @@ | ||
Class { | ||
#name : 'MTSmallBank2', | ||
#superclass : 'Object', | ||
#instVars : [ | ||
'balance' | ||
], | ||
#category : 'MuTalk-CI-Tests', | ||
#package : 'MuTalk-CI-Tests' | ||
} | ||
|
||
{ #category : 'as yet unclassified' } | ||
MTSmallBank2 class >> calculateRate: aPercent amount: anInt [ | ||
" I expect it profiled" | ||
aPercent < 0 ifTrue: [ self error: 'negetive ' ]. | ||
^ (anInt * aPercent / 100) asInteger | ||
] | ||
|
||
{ #category : 'as yet unclassified' } | ||
MTSmallBank2 class >> calculateRate: aPercent amount: anInt month: monthes [ | ||
"I expect it not profiled." | ||
^ (self calculateRate: aPercent amount: anInt) / monthes asInteger | ||
] | ||
|
||
{ #category : 'as yet unclassified' } | ||
MTSmallBank2 class >> calculateRateExample [ | ||
"I expect it added in input amplification" | ||
|
||
^ self calculateRate: 2 amount: 1000000 month: 12 | ||
] | ||
|
||
{ #category : 'instance creation' } | ||
MTSmallBank2 class >> with: amount [ | ||
^ self new | ||
deposit: amount; | ||
yourself | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTSmallBank2 >> balance [ | ||
^ balance | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTSmallBank2 >> deposit: amount [ | ||
amount < 0 | ||
ifTrue: [ Error new signal ]. | ||
balance := balance + amount | ||
] | ||
|
||
{ #category : 'initialization' } | ||
MTSmallBank2 >> initialize [ | ||
balance := 0 | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTSmallBank2 >> withdraw: amount [ | ||
balance >= amount | ||
ifTrue: [ balance := balance - amount ] | ||
ifFalse: [ Error new signal ] | ||
] |
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,37 @@ | ||
Class { | ||
#name : 'MTSmallBank2Test', | ||
#superclass : 'TestCase', | ||
#category : 'MuTalk-CI-Tests', | ||
#package : 'MuTalk-CI-Tests' | ||
} | ||
|
||
{ #category : 'tests' } | ||
MTSmallBank2Test >> testDeposit [ | ||
| b | | ||
b := MTSmallBank2 with: 10. | ||
self assert: b balance equals: 10. | ||
b deposit: 100. | ||
self assert: b balance equals: 110 | ||
] | ||
|
||
{ #category : 'tests' } | ||
MTSmallBank2Test >> testInit [ | ||
| b | | ||
b := MTSmallBank2 new. | ||
self assert: b balance equals: 0 | ||
] | ||
|
||
{ #category : 'tests' } | ||
MTSmallBank2Test >> testPercent [ | ||
MTSmallBank2 calculateRate: 10 amount: 1000 | ||
] | ||
|
||
{ #category : 'tests' } | ||
MTSmallBank2Test >> testWithdraw [ | ||
| b | | ||
b := MTSmallBank2 new. | ||
b deposit: 100. | ||
self assert: b balance equals: 100. | ||
b withdraw: 30. | ||
self assert: b balance equals: 70 | ||
] |
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,32 @@ | ||
Class { | ||
#name : 'MTSmallBankTest', | ||
#superclass : 'TestCase', | ||
#category : 'MuTalk-CI-Tests', | ||
#package : 'MuTalk-CI-Tests' | ||
} | ||
|
||
{ #category : 'tests' } | ||
MTSmallBankTest >> testDeposit [ | ||
| b | | ||
b := MTSmallBank new. | ||
b deposit: 10. | ||
self assert: b balance equals: 10. | ||
b deposit: 100. | ||
self assert: b balance equals: 110 | ||
] | ||
|
||
{ #category : 'tests' } | ||
MTSmallBankTest >> testInit [ | ||
| b | | ||
b := MTSmallBank new .self assert: b balance equals: 0 | ||
] | ||
|
||
{ #category : 'tests' } | ||
MTSmallBankTest >> testWithdraw [ | ||
| b | | ||
b := MTSmallBank new. | ||
b deposit: 100. | ||
self assert: b balance equals: 100. | ||
b withdraw: 30. | ||
self assert: b balance equals: 70 | ||
] |
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,79 @@ | ||
Class { | ||
#name : 'MTAbstractExporter', | ||
#superclass : 'Object', | ||
#instVars : [ | ||
'mtResult', | ||
'pull_request_id', | ||
'commit', | ||
'cloneLocation', | ||
'root' | ||
], | ||
#category : 'MuTalk-CI', | ||
#package : 'MuTalk-CI' | ||
} | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> cloneLocation [ | ||
|
||
^ cloneLocation | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> cloneLocation: anObject [ | ||
|
||
cloneLocation := anObject | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> commit [ | ||
|
||
^ commit | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> commit: anObject [ | ||
|
||
commit := anObject | ||
] | ||
|
||
{ #category : 'as yet unclassified' } | ||
MTAbstractExporter >> export [ | ||
|
||
self subclassResponsibility | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> mtResult [ | ||
|
||
^ mtResult | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> mtResult: anObject [ | ||
|
||
mtResult := anObject | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> pull_request_id [ | ||
|
||
^ pull_request_id | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> pull_request_id: anObject [ | ||
|
||
pull_request_id := anObject | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> root [ | ||
|
||
^ root | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MTAbstractExporter >> root: anObject [ | ||
|
||
root := anObject | ||
] |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.