@@ -308,23 +308,6 @@ PMComplexNumberTest >> testCosh2MinusSinh2 [
308308 self assert: (c cosh squared - c sinh squared) imaginary closeTo: 0.0 ] ]
309309]
310310
311- { #category : #' testing - expressing complex numbers' }
312- PMComplexNumberTest >> testCreation [
313- | c |
314- c := 5 i.
315- self assert: c real equals: 0 .
316- self assert: c imaginary equals: 5 .
317- c := 6 + 7 i.
318- self assert: c real equals: 6 .
319- self assert: c imaginary equals: 7 .
320- c := 5.6 - 8 i.
321- self assert: c real equals: 5.6 .
322- self assert: c imaginary equals: - 8 .
323- c := PMComplexNumber real: 10 imaginary: 5 .
324- self assert: c real equals: 10 .
325- self assert: c imaginary equals: 5 .
326- ]
327-
328311{ #category : #' testing - arithmetic' }
329312PMComplexNumberTest >> testDividingALargeComplexNumbersByItself [
330313 | c1 c2 quotient |
@@ -937,6 +920,23 @@ PMComplexNumberTest >> testTwoComplexNumbersWithDifferentRealPartsAreNotEqual [
937920 self deny: z equals: w
938921]
939922
923+ { #category : #' testing - expressing complex numbers' }
924+ PMComplexNumberTest >> testWritingComplexNumbersInCartesianCoordinates [
925+ | c |
926+ c := 5 i.
927+ self assert: c real equals: 0 .
928+ self assert: c imaginary equals: 5 .
929+ c := 6 + 7 i.
930+ self assert: c real equals: 6 .
931+ self assert: c imaginary equals: 7 .
932+ c := 5.6 - 8 i.
933+ self assert: c real equals: 5.6 .
934+ self assert: c imaginary equals: - 8 .
935+ c := PMComplexNumber real: 10 imaginary: 5 .
936+ self assert: c real equals: 10 .
937+ self assert: c imaginary equals: 5 .
938+ ]
939+
940940{ #category : #' testing - expressing complex numbers' }
941941PMComplexNumberTest >> testWritingComplexNumbersInPolarCoordinates [
942942 | c |
0 commit comments