From 26f762cd1e918f2ee29bcdac39ed3d0ff357a861 Mon Sep 17 00:00:00 2001 From: hemalvarambhia Date: Wed, 27 Dec 2023 19:26:22 +0000 Subject: [PATCH] refactor: replaced equating constants with equating polynomials. --- src/Math-Tests-Polynomials/PMPolynomialTest.class.st | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Math-Tests-Polynomials/PMPolynomialTest.class.st b/src/Math-Tests-Polynomials/PMPolynomialTest.class.st index 6148fbce..71482c7c 100644 --- a/src/Math-Tests-Polynomials/PMPolynomialTest.class.st +++ b/src/Math-Tests-Polynomials/PMPolynomialTest.class.st @@ -229,11 +229,11 @@ PMPolynomialTest >> testPolynomialNumberMultiplicationInverse [ { #category : #'testing - subtraction' } PMPolynomialTest >> testPolynomialNumberSubtraction [ - | polynomial | - polynomial := 2 - (PMPolynomial coefficients: #(2 -3 1)). - self assert: (polynomial at: 0) equals: 0. - self assert: (polynomial at: 1) equals: 3. - self assert: (polynomial at: 2) equals: -1. + + | polynomial expected | + polynomial := 2 - (PMPolynomial coefficients: #( 2 -3 1 )). + expected := PMPolynomial coefficients: #( 0 3 -1 ). + self assert: polynomial equals: expected. self assert: (polynomial at: 3) equals: 0 ]