Skip to content

Commit 148dbf2

Browse files
author
Durieux Pol
committed
fix
1 parent efa3d6a commit 148dbf2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MuTalk-Tests/MTFakeInfiniteLoopForTest.class.st

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ Class {
55
#package : 'MuTalk-Tests'
66
}
77

8-
{ #category : 'not defined protocol' }
8+
{ #category : 'factorials' }
99
MTFakeInfiniteLoopForTest >> iterativeFactorial: anInt [
1010

1111
| factorial i |
1212
^ anInt = 1
1313
ifTrue: [ 1 ]
14-
ifFalse: [
14+
ifFalse: [
1515
factorial := 1.
1616
i := 2.
1717
"Use a whileTrue: so a mutation can introduce an infinite loop here"
18-
[ true ] whileTrue: [
18+
[ i <= anInt ] whileTrue: [
1919
factorial := factorial * i.
2020
i := i + 1 ].
2121
factorial ]

0 commit comments

Comments
 (0)