Skip to content

Commit

Permalink
refactor: extracted writing complex numbers in polar coordinates to t…
Browse files Browse the repository at this point in the history
…heir own tests.
  • Loading branch information
hemalvarambhia committed Jan 16, 2024
1 parent baaa8a3 commit ec19743
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Math-Tests-Complex/PMComplexNumberTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,6 @@ PMComplexNumberTest >> testCreation [
c := PMComplexNumber real: 10 imaginary: 5.
self assert: c real equals: 10.
self assert: c imaginary equals: 5.
c := PMComplexNumber abs: 5 arg: Float pi / 2.
self assert: c real rounded equals: 0.
self assert: c imaginary equals: 5
]

{ #category : #'testing - arithmetic' }
Expand Down Expand Up @@ -940,6 +937,15 @@ PMComplexNumberTest >> testTwoComplexNumbersWithDifferentRealPartsAreNotEqual [
self deny: z equals: w
]

{ #category : #'testing - expressing complex numbers' }
PMComplexNumberTest >> testWritingComplexNumbersInRadialCoordinates [
| c |

c := PMComplexNumber abs: 5 arg: Float pi / 2.
self assert: c real rounded equals: 0.
self assert: c imaginary equals: 5
]

{ #category : #'testing - expressing complex numbers' }
PMComplexNumberTest >> testWritingComplexNumbersWhoseRealAndImaginaryPartsAreFractions [
| z |
Expand Down

0 comments on commit ec19743

Please sign in to comment.