From e976c646477205ea8a441b8470fc45910ac64b6c Mon Sep 17 00:00:00 2001 From: hemalvarambhia Date: Sat, 6 Jan 2024 18:23:15 +0000 Subject: [PATCH] test: cleaned up the test. --- src/Math-Tests-Complex/PMComplexNumberTest.class.st | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Math-Tests-Complex/PMComplexNumberTest.class.st b/src/Math-Tests-Complex/PMComplexNumberTest.class.st index e14e7e91..a3a4d015 100644 --- a/src/Math-Tests-Complex/PMComplexNumberTest.class.st +++ b/src/Math-Tests-Complex/PMComplexNumberTest.class.st @@ -630,12 +630,11 @@ PMComplexNumberTest >> testQuotientsOfComplexNumbersCannotBeWritten [ { #category : #'testing - mathematical functions' } PMComplexNumberTest >> testRaisedTo [ - | c squareRootOfZSquared z | - c := 5 - 6 i. + | expected squareRootOfZSquared z | z := 5 - 6 i. - squareRootOfZSquared := (c raisedTo: 1 / 2) raisedTo: 2. - self assert: squareRootOfZSquared real closeTo: c real. - self assert: squareRootOfZSquared imaginary closeTo: c imaginary + squareRootOfZSquared := (z raisedTo: 1 / 2) raisedTo: 2. + expected := 5 - 6 i. + self assert: squareRootOfZSquared closeTo: expected ] { #category : #'testing - mathematical functions' }