Skip to content

Commit ec19743

Browse files
refactor: extracted writing complex numbers in polar coordinates to their own tests.
1 parent baaa8a3 commit ec19743

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,6 @@ PMComplexNumberTest >> testCreation [
323323
c := PMComplexNumber real: 10 imaginary: 5.
324324
self assert: c real equals: 10.
325325
self assert: c imaginary equals: 5.
326-
c := PMComplexNumber abs: 5 arg: Float pi / 2.
327-
self assert: c real rounded equals: 0.
328-
self assert: c imaginary equals: 5
329326
]
330327

331328
{ #category : #'testing - arithmetic' }
@@ -940,6 +937,15 @@ PMComplexNumberTest >> testTwoComplexNumbersWithDifferentRealPartsAreNotEqual [
940937
self deny: z equals: w
941938
]
942939

940+
{ #category : #'testing - expressing complex numbers' }
941+
PMComplexNumberTest >> testWritingComplexNumbersInRadialCoordinates [
942+
| c |
943+
944+
c := PMComplexNumber abs: 5 arg: Float pi / 2.
945+
self assert: c real rounded equals: 0.
946+
self assert: c imaginary equals: 5
947+
]
948+
943949
{ #category : #'testing - expressing complex numbers' }
944950
PMComplexNumberTest >> testWritingComplexNumbersWhoseRealAndImaginaryPartsAreFractions [
945951
| z |

0 commit comments

Comments
 (0)