Skip to content

Commit 4a0cbb4

Browse files
Clarified the description of the behaviour.
1 parent 6e0deea commit 4a0cbb4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/Math-Tests-Complex/PMComplexTest.class.st

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -627,19 +627,7 @@ PMComplexTest >> testSquareRootOfANegativeRealNumberIsPureImaginary [
627627
]
628628

629629
{ #category : #tests }
630-
PMComplexTest >> testSquareRootOfPositiveRealNumberIsAComplexNumberWithOnlyARealPart [
631-
632-
"Given z = 6 + 0 i, then root z = root 6"
633-
634-
| squareRoot expected |
635-
squareRoot := (PMComplex real: 6 imaginary: 0) sqrt.
636-
637-
expected := PMComplex real: (6 sqrt) imaginary: 0.
638-
self assert: squareRoot equals: expected
639-
]
640-
641-
{ #category : #tests }
642-
PMComplexTest >> testSquareRootOfPureImaginaryNumberIsAComplexNumberWithRealAndImaginaryParts [
630+
PMComplexTest >> testSquareRootOfPositivePureImaginaryNumberIsAComplexNumberWithRealAndImaginaryParts [
643631

644632
"e.g. square root of 4 i = root(2) + i root(2)"
645633

@@ -653,6 +641,18 @@ PMComplexTest >> testSquareRootOfPureImaginaryNumberIsAComplexNumberWithRealAndI
653641
self assert: squareRoot imaginary closeTo: expected imaginary
654642
]
655643

644+
{ #category : #tests }
645+
PMComplexTest >> testSquareRootOfPositiveRealNumberIsAComplexNumberWithOnlyARealPart [
646+
647+
"Given z = 6 + 0 i, then root z = root 6"
648+
649+
| squareRoot expected |
650+
squareRoot := (PMComplex real: 6 imaginary: 0) sqrt.
651+
652+
expected := PMComplex real: (6 sqrt) imaginary: 0.
653+
self assert: squareRoot equals: expected
654+
]
655+
656656
{ #category : #tests }
657657
PMComplexTest >> testSquareRootOfZeroIsZero [
658658
"comment stating purpose of instance-side method"

0 commit comments

Comments
 (0)