Skip to content

Commit

Permalink
[issue-154] Fixed the bug?
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalvarambhia committed Mar 22, 2020
1 parent fa2463d commit 948e95d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Math-Tests-Accuracy/PMAccuracyTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ PMAccuracyTest >> testExtractFromResultsWhichOnlyOne [
assert: (a extractFromResults: #('bla' 'blah') which: 2 onlyOne: false)
equals: 'blah'.
"Why are we getting the argument?"
self assert: a testGetterAaa second = #(true) description: [ a asString ].
self assert: (a testGetter: 'Aaa') second equals: #(true).
self
assert: (a extractFromResults: #('bla' 'blah') which: 1 onlyOne: true)
equals: #('bla' 'blah').
self assert: a testGetterAaa second = #(#(false) #(true)) description: a asString
self assert: (a testGetter: 'Aaa') second = #(#(false) #(true)) description: a asString
]

{ #category : #tests }
Expand Down
20 changes: 19 additions & 1 deletion src/Math-Tests-Accuracy/PMAccuracyTestExample.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ Class {
#category : #'Math-Tests-Accuracy'
}

{ #category : #'as yet unclassified' }
PMAccuracyTestExample >> argumentWith: key [
| r |
r := self argumentAt: (self findKey: key).
numberOfResults ifNotNil: [ :rn | r := r at: rn ].
^ r
]

{ #category : #converting }
PMAccuracyTestExample >> asString [
^ theSelector asString , theSender asString , self argument asString, self parameter asString , names asString
^ theSender asString , theSelector asString , self argument asString, self parameter asString , names asString
]

{ #category : #tests }
Expand Down Expand Up @@ -151,6 +159,16 @@ PMAccuracyTestExample >> tearDown [
count := count - (1 / 5)
]

{ #category : #tests }
PMAccuracyTestExample >> testGetter: key [
^ Array
with: self parameter
with: (self argumentWith: 'Aaa')
with: (self resultsAt: 'Aaa')
with: (self numberOfDifferentParametersAt: 'Aaa')
with: (self numberOfDifferentResultsAt: 'Aaa')
]

{ #category : #private }
PMAccuracyTestExample >> testGetterAaa [
^Array
Expand Down

0 comments on commit 948e95d

Please sign in to comment.