Created
October 14, 2020 14:07
-
-
Save mabdi/78789dbddfb2d0da4114853419dd893d to your computer and use it in GitHub Desktop.
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
'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:06:48.881327 pm'! | |
RSChartTest subclass: #RSChartTest374 | |
instanceVariableNames: '' | |
classVariableNames: '' | |
package: 'SmallAmpFinalClasses'! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testMustInclude02_amp_A15_A29 | |
"I test correctness of: | |
- `^ self xScale: NSScale symlog` in method: `RSChart >> #xLog` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#xLog#7#35'> | |
<madeBySmallAmp> | |
| y c aNSSymLogScale | | |
y := #(-10 -13 -15). | |
c := RSChart new. | |
aNSSymLogScale := c xLog. | |
self assert: | |
aNSSymLogScale class equals: NSSymLogScale. | |
c | |
addDecoration: RSYMarkerDecoration new; | |
addPlot: (RSLinePlot new y: y); | |
mustInclude0inY; | |
build! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/14/2020 14:01'! | |
testWithWeirdValuesLineWithTicks2_amp_A176_A284_A143 | |
<smallAmpCoveres: 'ReplaceDoBlockWithEmptyBlockOperator#RSChart#yScale:#17#64'> | |
<madeBySmallAmp> | |
| x g d c labels aRSChart | | |
x := {-5 . 0 . 1 . 2}. | |
g := RSChart new. | |
d := RSLinePlot new x: x y: x log. | |
aRSChart := g | |
addPlot: d; | |
addDecoration: RSVerticalTick new. | |
g yRawLog. | |
aRSChart mustInclude0inY. | |
self should: [ g build ] raise: AssertionFailure! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testMinMaxValue_amp_A46_A41_A23 | |
"I test correctness of: | |
- `^ self yScale: NSScale linear` in method: `RSChart >> #yLinear` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#yLinear#10#38'> | |
<madeBySmallAmp> | |
| y c aNSLinearScale | | |
y := #(10 13 15). | |
c := RSChart new. | |
aNSLinearScale := c yLinear. | |
self assert: | |
aNSLinearScale class equals: NSLinearScale. | |
c | |
addPlot: (RSLinePlot new y: y); | |
defaultPlotColors; | |
minValueX; | |
build! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testBasic_amp_A273 | |
"I test correctness of: | |
- `^ self xScale: NSScale sqrt` in method: `RSChart >> #xSqrt` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#decorations#71#83'> | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#xSqrt#8#34'> | |
<madeBySmallAmp> | |
| x aRSChart aNSPowScale | | |
x := -10.0 to: 20.0 count: 100. | |
aRSChart := RSChart new. | |
aNSPowScale := aRSChart | |
addPlot: (RSScatterPlot new x: x y: (x raisedTo: 3)); | |
addPlot: (RSLinePlot new x: x y: (x raisedTo: 2)); | |
addDecoration: RSHorizontalTick new; | |
addDecoration: RSVerticalTick new; | |
xSqrt. | |
self assert: | |
aNSPowScale class equals: NSPowScale! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testBasic_amp | |
"I test correctness of: | |
- `^ decorations` in method: `RSChart >> #decorations` | |
- `^ colors` in method: `RSChart >> #colors` | |
- `^ plots size` in method: `RSChart >> #numberOfPlots` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#decorations#71#83'> | |
<madeBySmallAmp> | |
| x aRSChart | | |
x := -10.0 to: 20.0 count: 100. | |
aRSChart := RSChart new. | |
self | |
assert: | |
aRSChart decorations class equals: OrderedCollection; | |
assert: | |
aRSChart colors class equals: NSOrdinalScale; | |
assert: | |
aRSChart numberOfPlots equals: 0. | |
aRSChart | |
addPlot: (RSScatterPlot new x: x y: (x raisedTo: 3)); | |
addPlot: (RSLinePlot new x: x y: (x raisedTo: 2)); | |
addDecoration: RSHorizontalTick new; | |
addDecoration: RSVerticalTick new! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testBasic_amp_U0_A217 | |
"I test correctness of: | |
- `^ self xScale: NSScale ln` in method: `RSChart >> #xLn` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#decorations#71#83'> | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#xLn#6#30'> | |
<madeBySmallAmp> | |
| x aRSChart aNSLnScale | | |
x := -10.0 to: 20.0 count: 100. | |
aRSChart := RSChart new. | |
aNSLnScale := (aRSChart | |
addPlot: (RSScatterPlot new x: x y: (x raisedTo: 100)); | |
addPlot: (RSLinePlot new x: x y: (x raisedTo: 100)); | |
addDecoration: RSHorizontalTick new) xLn. | |
self assert: | |
aNSLnScale class equals: NSLnScale. | |
aRSChart addDecoration: RSVerticalTick new! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testMustInclude02_amp_A181_A179 | |
"I test correctness of: | |
- `^ self yScale: NSScale log` in method: `RSChart >> #yRawLog` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#yRawLog#64#89'> | |
<madeBySmallAmp> | |
| y c aNSLogScale | | |
y := #(-10 -13 -15). | |
c := RSChart new. | |
aNSLogScale := (c | |
addPlot: (RSLinePlot new y: y); | |
mustInclude0inY) yRawLog. | |
self assert: | |
aNSLogScale class equals: NSLogScale. | |
c | |
build; | |
xLn! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testBasic_amp_A141 | |
"I test correctness of: | |
- `^ aScale` in method: `RSChart >> #yScale:` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#decorations#71#83'> | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#yScale:#68#75'> | |
<madeBySmallAmp> | |
| x aRSChart aNSPowScale | | |
x := -10.0 to: 20.0 count: 100. | |
aRSChart := RSChart new. | |
aNSPowScale := aRSChart | |
addPlot: (RSScatterPlot new x: x y: (x raisedTo: 3)); | |
addPlot: (RSLinePlot new x: x y: (x raisedTo: 2)); | |
ySqrt. | |
self assert: | |
aNSPowScale class equals: NSPowScale. | |
aRSChart | |
addDecoration: RSHorizontalTick new; | |
addDecoration: RSVerticalTick new! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testMinMaxValue_amp_A173_A62 | |
"I test correctness of: | |
- `^ self xScale: NSScale linear` in method: `RSChart >> #xLinear` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#xLinear#10#38'> | |
<madeBySmallAmp> | |
| y c aNSLinearScale | | |
y := #(10 13 15). | |
c := RSChart new. | |
aNSLinearScale := c | |
addPlot: (RSLinePlot new y: y); | |
xLinear. | |
self assert: | |
aNSLinearScale class equals: NSLinearScale. | |
c build! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testMustInclude03_amp_A154_A14 | |
"I test correctness of: | |
- `^ self yScale: NSScale ln` in method: `RSChart >> #yLn` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#yLn#6#30'> | |
<madeBySmallAmp> | |
| y c x aNSLnScale | | |
y := #(-10 -13 -15). | |
x := #(4 6 9). | |
c := RSChart new. | |
aNSLnScale := c yLn. | |
self assert: | |
aNSLnScale class equals: NSLnScale. | |
(c | |
addPlot: (RSLinePlot new x: x y: y); | |
mustInclude0inX) minValueX. | |
c build! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:35'! | |
testMinMaxValue2_amp_A67 | |
"I test correctness of: | |
- `^ self yScale: NSScale symlog` in method: `RSChart >> #yLog` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#yLog#7#35'> | |
<madeBySmallAmp> | |
| y c x aNSSymLogScale | | |
y := #(-10 -13 -15). | |
x := #(4 6 9). | |
c := RSChart new. | |
aNSSymLogScale := c | |
addPlot: (RSLinePlot new x: x y: y); | |
yLog. | |
self assert: | |
aNSSymLogScale class equals: NSSymLogScale. | |
c build! ! | |
!RSChartTest374 methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/14/2020 14:06'! | |
testMinMaxValue2_amp_A117_A49 | |
"I test correctness of: | |
- `^ colors scale: aRSPlot` in method: `RSChart >> #colorFor:` | |
" | |
<smallAmpCoveres: 'RemoveCaretOperator#RSChart#colorFor:#103#125'> | |
<madeBySmallAmp> | |
| y c x aColor | | |
y := #(-10 -13 -15). | |
x := #(4 6 9). | |
c := RSChart new. | |
aColor := c | |
addPlot: (RSLinePlot new x: x y: y); | |
colorFor: RSLinePlot new. | |
self assert: | |
aColor class equals: Color. | |
c | |
build; | |
maxValueY! ! | |
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! | |
RSChartTest374 class | |
instanceVariableNames: ''! | |
!RSChartTest374 class methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:30'! | |
allTestSelectors | |
| answer | | |
answer := Set withAll: self testSelectors. | |
answer addAll: self superclass allTestSelectors. | |
^ answer asSortedCollection asOrderedCollection! ! | |
!RSChartTest374 class methodsFor: 'as yet unclassified' stamp: 'Mehrdad 10/9/2020 14:30'! | |
defaultTimeLimit | |
^ 3 seconds ! ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment