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 84b6af9 commit aaefdcfCopy full SHA for aaefdcf
1 file changed
src/Math-Tests-Polynomials/PMPolynomialTest.class.st
@@ -295,14 +295,12 @@ PMPolynomialTest >> testPolynomialRootsForLinear [
295
{ #category : #'testing - subtraction' }
296
PMPolynomialTest >> testPolynomialSubtraction [
297
298
- | polynomial p q |
+ | polynomial p q expected |
299
p := PMPolynomial coefficients: #( 2 -3 1 ).
300
q := PMPolynomial coefficients: #( -3 7 2 1 ).
301
polynomial := p - q.
302
- self assert: (polynomial at: 0) equals: 5.
303
- self assert: (polynomial at: 1) equals: -10.
304
- self assert: (polynomial at: 2) equals: -1.
305
- self assert: (polynomial at: 3) equals: -1.
+ expected := PMPolynomial coefficients: #( 5 -10 -1 -1 ).
+ self assert: polynomial equals: expected.
306
self assert: (polynomial at: 4) equals: 0
307
]
308
0 commit comments