Skip to content

Commit aaefdcf

Browse files
refactor: replaced equating coefficients with equating Polynomials.
1 parent 84b6af9 commit aaefdcf

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/Math-Tests-Polynomials/PMPolynomialTest.class.st

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,12 @@ PMPolynomialTest >> testPolynomialRootsForLinear [
295295
{ #category : #'testing - subtraction' }
296296
PMPolynomialTest >> testPolynomialSubtraction [
297297

298-
| polynomial p q |
298+
| polynomial p q expected |
299299
p := PMPolynomial coefficients: #( 2 -3 1 ).
300300
q := PMPolynomial coefficients: #( -3 7 2 1 ).
301301
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.
302+
expected := PMPolynomial coefficients: #( 5 -10 -1 -1 ).
303+
self assert: polynomial equals: expected.
306304
self assert: (polynomial at: 4) equals: 0
307305
]
308306

0 commit comments

Comments
 (0)