Skip to content

Instantly share code, notes, and snippets.

@mabdi
Created October 14, 2020 14:11
Show Gist options
  • Save mabdi/116b70a3368bb5b23268dbd6c07ba231 to your computer and use it in GitHub Desktop.
Save mabdi/116b70a3368bb5b23268dbd6c07ba231 to your computer and use it in GitHub Desktop.
'From Pharo8.0.0 of 22 January 2020 [Build information: Pharo-8.0.0+build.1124.sha.0932da82f08175e906b0e2a8052120c823374e9f (64 Bit)] on 14 October 2020 at 4:10:53.791981 pm'!
RSResizeTest subclass: #RSResizeTest575
instanceVariableNames: ''
classVariableNames: ''
package: 'SmallAmpFinalClasses'!
!RSResizeTest575 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 15:53'!
testBiggestShape_amp_A16_A11
"I test correctness of:
- `widestElement extent x < e extent x
ifTrue: [ e ]
ifFalse: [ widestElement ]` in method: `RSResize >> #widestShape`
"
<smallAmpCoveres:
'ReplaceIfTrueIfFalseReceiverWithTrueOperator#RSResize#widestShape#77#156'>
<madeBySmallAmp>
resize
useBiggestShape;
sameWidth.
self assert: resize widestShape baseRectangle top equals: -0.5.
resize biggestExtent! !
!RSResizeTest575 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 15:53'!
testBiggestExtent_amp_A14
"I test correctness of:
- `biggestShape extent < e extent
ifTrue: [ e ]
ifFalse: [ biggestShape ]` in method: `RSResize >> #biggestShape`
- `highestShape extent y < e extent y
ifTrue: [ e ]
ifFalse: [ highestShape ]` in method: `RSResize >> #highestShape`
- `^ fixedShape extent` in method: `RSResize >> #biggestExtent`
"
<smallAmpCoveres:
'ReplaceIfTrueIfFalseReceiverWithTrueOperator#RSResize#highestShape#77#154'>
<madeBySmallAmp>
resize
biggestExtent;
sameHeight.
self
assert: resize biggestShape baseRectangle area equals: 6.0;
assert: resize highestShape baseRectangle area equals: 6.0;
assert: resize biggestExtent equals: 4.0 @ 3.0! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
RSResizeTest575 class
instanceVariableNames: ''!
!RSResizeTest575 class methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 15:52'!
allTestSelectors
| answer |
answer := Set withAll: self testSelectors.
answer addAll: self superclass allTestSelectors.
^ answer asSortedCollection asOrderedCollection! !
!RSResizeTest575 class methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 15:52'!
defaultTimeLimit
^ 3 seconds ! !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment