Skip to content

Commit abf6a61

Browse files
test: demonstrated that sending raiseToInteger: with floating point number raises an Error.
1 parent eca5b1d commit abf6a61

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,13 @@ PMComplexNumberTest >> testRaisedToInteger [
655655
self assert: c3 reciprocal equals: (c raisedToInteger: -3)
656656
]
657657

658+
{ #category : #'testing - mathematical functions' }
659+
PMComplexNumberTest >> testRaisedToIntegerWithFloats [
660+
|z|
661+
z := 5 - 9 i.
662+
self should: [ z raisedToInteger: 3.0 ] raise: ArithmeticError .
663+
]
664+
658665
{ #category : #'testing - mathematical functions' }
659666
PMComplexNumberTest >> testRaisedToNegativeInteger [
660667
"

0 commit comments

Comments
 (0)