Skip to content

Instantly share code, notes, and snippets.

@mabdi
Created October 14, 2020 14:10
Show Gist options
  • Save mabdi/57d4858f6c7128b202a6d36ec793d59f to your computer and use it in GitHub Desktop.
Save mabdi/57d4858f6c7128b202a6d36ec793d59f 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:09:42.330761 pm'!
RSLabelTest subclass: #RSLabelTest439
instanceVariableNames: ''
classVariableNames: ''
package: 'SmallAmpFinalClasses'!
!RSLabelTest439 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:53'!
testHasChildren_amp_A12_A55_A119
"I test correctness of:
- `text = string` in method: `RSLabel >> #text:` when {#text->'UNASSIGNED'. #string->'Hello world!!'}
"
<smallAmpCoveres: 'RemoveCaretOperator#RSLabel#emphasis#103#112'>
<smallAmpCoveres: 'ReplaceEqualWithNotEqualOperator#RSLabel#text:#15#27'>
<madeBySmallAmp>
| b aRSLabel |
aRSLabel := RSLabel new normal italic.
aRSLabel text: 'Hello world!!'.
self
assert:
aRSLabel computeEncompassingRectangle extent
equals: 96.0 @ 23.0! !
!RSLabelTest439 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:53'!
testHasChildren_amp
"I test correctness of:
- `^ fontName` in method: `RSLabel >> #fontName` when {#fontName->'Source Sans Pro'}
- `^ self is: 2` in method: `RSLabel >> #isItalic`
- `^ fontSize` in method: `RSLabel >> #fontSize` when {#fontSize->13.333333333333334}
- `^ emphasis` in method: `RSLabel >> #emphasis`
"
<smallAmpCoveres: 'RemoveCaretOperator#RSLabel#emphasis#103#112'>
<madeBySmallAmp>
| b |
b := RSLabel new.
self
assert: b fontName equals: 'Source Sans Pro';
deny: b isItalic;
assert: b fontSize equals: 13.333333333333334;
assert: b emphasis class equals: TextEmphasis! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
RSLabelTest439 class
instanceVariableNames: ''!
!RSLabelTest439 class methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:53'!
allTestSelectors
| answer |
answer := Set withAll: self testSelectors.
answer addAll: self superclass allTestSelectors.
^ answer asSortedCollection asOrderedCollection! !
!RSLabelTest439 class methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:53'!
defaultTimeLimit
^ 3 seconds ! !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment