We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03ae30d commit 31baea4Copy full SHA for 31baea4
1 file changed
src/Math-Tests-Polynomials/PMPolynomialTest.class.st
@@ -40,11 +40,10 @@ PMPolynomialTest >> testPolynomialAdditionIsCommutative [
40
PMPolynomialTest >> testPolynomialDerivative [
41
"Code example 2.3"
42
43
- | polynomial |
44
- polynomial := (PMPolynomial coefficients: #(-3 7 2 1)) derivative.
45
- self assert: (polynomial at: 0) equals: 7.
46
- self assert: (polynomial at: 1) equals: 4.
47
- self assert: (polynomial at: 2) equals: 3.
+ | polynomial expectedDerivative |
+ polynomial := (PMPolynomial coefficients: #( -3 7 2 1 )) derivative.
+ expectedDerivative := PMPolynomial coefficients: #( 7 4 3 ).
+ self assert: polynomial equals: expectedDerivative.
48
self assert: (polynomial at: 3) equals: 0.
49
self assert: (polynomial at: 4) equals: 0
50
]
0 commit comments