Skip to content

Commit 8320ec0

Browse files
refactor: Extract variable so we can make the operation being tested clearer.
1 parent 2ba7c68 commit 8320ec0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,9 @@ PMPolynomialTest >> testPolynomialNumberAdditionInverse [
203203
{ #category : #'testing - division' }
204204
PMPolynomialTest >> testPolynomialNumberDivision [
205205

206-
| polynomial expected expectedCoefficients |
207-
polynomial := (PMPolynomial coefficients: #( 2 -3 1 )) / 2.
206+
| polynomial expected expectedCoefficients p |
207+
p := PMPolynomial coefficients: #( 2 -3 1 ).
208+
polynomial := p / 2.
208209
expectedCoefficients := Array with: 1 with: -3 / 2 with: 1 / 2.
209210
expected := PMPolynomial coefficients: expectedCoefficients.
210211
self assert: polynomial equals: expected.

0 commit comments

Comments
 (0)