Skip to content

Commit af69a66

Browse files
test: added a test for positive integer.
1 parent 11c8e01 commit af69a66

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,14 @@ PMComplexNumberTest >> testRaisedToInteger [
646646
self assert: c3 reciprocal equals: (c raisedToInteger: -3)
647647
]
648648

649+
{ #category : #'testing - mathematical functions' }
650+
PMComplexNumberTest >> testRaisedToPositiveInteger [
651+
| z zCubed |
652+
z := (3 sqrt / 2) + (1 / 2) i.
653+
zCubed := (z raisedTo: 3) .
654+
self assert: zCubed closeTo: (0 + 1 i).
655+
]
656+
649657
{ #category : #tests }
650658
PMComplexNumberTest >> testRandom [
651659
| random c r |

0 commit comments

Comments
 (0)