diff --git a/src/Math-Tests-Polynomials/PMPolynomialTest.class.st b/src/Math-Tests-Polynomials/PMPolynomialTest.class.st index ac815685..c74a080d 100644 --- a/src/Math-Tests-Polynomials/PMPolynomialTest.class.st +++ b/src/Math-Tests-Polynomials/PMPolynomialTest.class.st @@ -15,13 +15,12 @@ PMPolynomialTest >> testIsZero [ { #category : #'testing - addition' } PMPolynomialTest >> testPolynomialAddition [ - | polynomial | - polynomial := (PMPolynomial coefficients: #(2 -3 1)) - + (PMPolynomial coefficients: #(-3 7 2 1)). - self assert: (polynomial at: 0) equals: -1. - self assert: (polynomial at: 1) equals: 4. - self assert: (polynomial at: 2) equals: 3. - self assert: (polynomial at: 3) equals: 1. + + | polynomial expected | + polynomial := (PMPolynomial coefficients: #( 2 -3 1 )) + + (PMPolynomial coefficients: #( -3 7 2 1 )). + expected := PMPolynomial coefficients: #( -1 4 3 1 ). + self assert: polynomial equals: expected. self assert: (polynomial at: 4) equals: 0 ]