Skip to content

Commit

Permalink
refactor: Extract variable so we can make the operation being tested …
Browse files Browse the repository at this point in the history
…clearer.
  • Loading branch information
hemalvarambhia committed Dec 27, 2023
1 parent 2ba7c68 commit 8320ec0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Math-Tests-Polynomials/PMPolynomialTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@ PMPolynomialTest >> testPolynomialNumberAdditionInverse [
{ #category : #'testing - division' }
PMPolynomialTest >> testPolynomialNumberDivision [

| polynomial expected expectedCoefficients |
polynomial := (PMPolynomial coefficients: #( 2 -3 1 )) / 2.
| polynomial expected expectedCoefficients p |
p := PMPolynomial coefficients: #( 2 -3 1 ).
polynomial := p / 2.
expectedCoefficients := Array with: 1 with: -3 / 2 with: 1 / 2.
expected := PMPolynomial coefficients: expectedCoefficients.
self assert: polynomial equals: expected.
Expand Down

0 comments on commit 8320ec0

Please sign in to comment.