From 8320ec0d933a0b1c192876071484ae51cea53894 Mon Sep 17 00:00:00 2001 From: hemalvarambhia Date: Wed, 27 Dec 2023 21:22:21 +0000 Subject: [PATCH] refactor: Extract variable so we can make the operation being tested clearer. --- src/Math-Tests-Polynomials/PMPolynomialTest.class.st | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Math-Tests-Polynomials/PMPolynomialTest.class.st b/src/Math-Tests-Polynomials/PMPolynomialTest.class.st index 3f7ab126..e3d4f2da 100644 --- a/src/Math-Tests-Polynomials/PMPolynomialTest.class.st +++ b/src/Math-Tests-Polynomials/PMPolynomialTest.class.st @@ -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.