Skip to content

Commit 4ddc12b

Browse files
test: Extract Variable, so that the operation being tested clear.
1 parent aaefdcf commit 4ddc12b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ PMPolynomialTest >> testIsZero [
1616
{ #category : #'testing - addition' }
1717
PMPolynomialTest >> testPolynomialAddition [
1818

19-
| polynomial expected |
20-
polynomial := (PMPolynomial coefficients: #( 2 -3 1 ))
21-
+ (PMPolynomial coefficients: #( -3 7 2 1 )).
19+
| polynomial expected p q |
20+
p := PMPolynomial coefficients: #( 2 -3 1 ).
21+
q := PMPolynomial coefficients: #( -3 7 2 1 ).
22+
polynomial := p + q.
2223
expected := PMPolynomial coefficients: #( -1 4 3 1 ).
2324
self assert: polynomial equals: expected.
2425
self assert: (polynomial at: 4) equals: 0

0 commit comments

Comments
 (0)