Skip to content

Commit

Permalink
test: demonstrated that sending raiseToInteger: with floating point n…
Browse files Browse the repository at this point in the history
…umber raises an Error.
  • Loading branch information
hemalvarambhia committed Jan 15, 2024
1 parent eca5b1d commit abf6a61
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Math-Tests-Complex/PMComplexNumberTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,13 @@ PMComplexNumberTest >> testRaisedToInteger [
self assert: c3 reciprocal equals: (c raisedToInteger: -3)
]

{ #category : #'testing - mathematical functions' }
PMComplexNumberTest >> testRaisedToIntegerWithFloats [
|z|
z := 5 - 9 i.
self should: [ z raisedToInteger: 3.0 ] raise: ArithmeticError .
]

{ #category : #'testing - mathematical functions' }
PMComplexNumberTest >> testRaisedToNegativeInteger [
"
Expand Down

0 comments on commit abf6a61

Please sign in to comment.