File tree Expand file tree Collapse file tree
src/Math-Tests-Polynomials Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,13 +127,15 @@ PMPolynomialTest >> testPolynomialHash [
127127PMPolynomialTest >> testPolynomialIntegral [
128128 " Code example 2.3"
129129
130- | polynomial |
131- polynomial := (PMPolynomial coefficients: #(-3 7 2 1) ) integral.
132- self assert: (polynomial at: 0 ) equals: 0 .
133- self assert: (polynomial at: 1 ) equals: - 3 .
134- self assert: (polynomial at: 2 ) equals: 7 / 2 .
135- self assert: (polynomial at: 3 ) equals: 2 / 3 .
136- self assert: (polynomial at: 4 ) equals: 1 / 4 .
130+ | polynomial expectedCoefficients expected |
131+ polynomial := (PMPolynomial coefficients: #( -3 7 2 1 ) ) integral.
132+ expectedCoefficients := Array
133+ with: 0
134+ with: - 3
135+ with: 7 / 2
136+ with: 2 / 3
137+ with: 1 / 4 .
138+ expected := PMPolynomial coefficients: expectedCoefficients.
137139 self assert: (polynomial at: 5 ) equals: 0
138140]
139141
You can’t perform that action at this time.
0 commit comments