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 @@ -202,11 +202,12 @@ PMPolynomialTest >> testPolynomialNumberAdditionInverse [
202202
203203{ #category : #' testing - division' }
204204PMPolynomialTest >> testPolynomialNumberDivision [
205- | polynomial |
206- polynomial := (PMPolynomial coefficients: #(2 -3 1) ) / 2 .
207- self assert: (polynomial at: 0 ) equals: 1 .
208- self assert: (polynomial at: 1 ) equals: - 3 / 2 .
209- self assert: (polynomial at: 2 ) equals: 1 / 2 .
205+
206+ | polynomial expected expectedCoefficients |
207+ polynomial := (PMPolynomial coefficients: #( 2 -3 1 ) ) / 2 .
208+ expectedCoefficients := Array with: 1 with: - 3 / 2 with: 1 / 2 .
209+ expected := PMPolynomial coefficients: expectedCoefficients.
210+ self assert: polynomial equals: expected.
210211 self assert: (polynomial at: 3 ) equals: 0
211212]
212213
You can’t perform that action at this time.
0 commit comments