Skip to content

Commit 84b6af9

Browse files
refactor: extract temp so we can show the computation being tested clearly.
1 parent 1d08970 commit 84b6af9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,11 @@ PMPolynomialTest >> testPolynomialRootsForLinear [
294294

295295
{ #category : #'testing - subtraction' }
296296
PMPolynomialTest >> testPolynomialSubtraction [
297-
| polynomial |
298-
polynomial := (PMPolynomial coefficients: #(2 -3 1))
299-
- (PMPolynomial coefficients: #(-3 7 2 1)).
297+
298+
| polynomial p q |
299+
p := PMPolynomial coefficients: #( 2 -3 1 ).
300+
q := PMPolynomial coefficients: #( -3 7 2 1 ).
301+
polynomial := p - q.
300302
self assert: (polynomial at: 0) equals: 5.
301303
self assert: (polynomial at: 1) equals: -10.
302304
self assert: (polynomial at: 2) equals: -1.

0 commit comments

Comments
 (0)