File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff 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 }
657657PMComplexTest >> testSquareRootOfZeroIsZero [
658658 " comment stating purpose of instance-side method"
You can’t perform that action at this time.
0 commit comments