Skip to content

Commit

Permalink
test: added a test for positive integer.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalvarambhia committed Jan 11, 2024
1 parent 11c8e01 commit af69a66
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Math-Tests-Complex/PMComplexNumberTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,14 @@ PMComplexNumberTest >> testRaisedToInteger [
self assert: c3 reciprocal equals: (c raisedToInteger: -3)
]

{ #category : #'testing - mathematical functions' }
PMComplexNumberTest >> testRaisedToPositiveInteger [
| z zCubed |
z := (3 sqrt / 2) + (1 / 2) i.
zCubed := (z raisedTo: 3) .
self assert: zCubed closeTo: (0 + 1 i).
]

{ #category : #tests }
PMComplexNumberTest >> testRandom [
| random c r |
Expand Down

0 comments on commit af69a66

Please sign in to comment.