Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Durieux Pol committed Apr 15, 2024
1 parent efa3d6a commit 148dbf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MuTalk-Tests/MTFakeInfiniteLoopForTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ Class {
#package : 'MuTalk-Tests'
}

{ #category : 'not defined protocol' }
{ #category : 'factorials' }
MTFakeInfiniteLoopForTest >> iterativeFactorial: anInt [

| factorial i |
^ anInt = 1
ifTrue: [ 1 ]
ifFalse: [
ifFalse: [
factorial := 1.
i := 2.
"Use a whileTrue: so a mutation can introduce an infinite loop here"
[ true ] whileTrue: [
[ i <= anInt ] whileTrue: [
factorial := factorial * i.
i := i + 1 ].
factorial ]
Expand Down

0 comments on commit 148dbf2

Please sign in to comment.