Skip to content

Commit f368cca

Browse files
Added a missing test to demonstrate we cannot take the reciprocal of a 0 + 0 i.
1 parent 157bdc0 commit f368cca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,11 @@ PMComplexTest >> testWeCanWriteComplexNumbersWhoseRealAndImaginaryPartsAreFracti
775775
self assert: (z imaginary) equals: (Fraction numerator: 4 denominator: 5).
776776
]
777777

778+
{ #category : #'testing - arithmetic' }
779+
PMComplexTest >> testWeCannotTakeReciprocalOfZeroComplexNumbers [
780+
self should: [ PMComplex zero reciprocal ] raise: ZeroDivide.
781+
]
782+
778783
{ #category : #'testing - expressing complex numbers' }
779784
PMComplexTest >> testWeCannotWriteFractionsOfComplexNumbersWithDenominatorNormalized [
780785

0 commit comments

Comments
 (0)