Mantis - Squeak
Viewing Issue Advanced Details
7111 SUnit feature N/A 07-06-08 00:31 07-10-08 10:07
nicolas cellier  
new 3.10  
0007111: [RFE] SUnit support for testing infinite recursion loop
I propose to add following extension:

self should: [myObject doSomething] notSendDeeperThan: 10000.
I propose a MessageTally-spy-like solution to this.

I'm still interested if anyone finds a way to assert infinite ITERATIVE loops (whileTrue and whileFalse...)

Note that this solution does not handle correctly an Error...
An Error would pass...
Up to Block/Exception gurus to give their advice.
 SUnit-infiniteRecursionSupport-M7111-nice.1.cs [^] (2,191 bytes) 07-06-08 00:38
 SUnit-infiniteRecursionSupport-Test-M7111-nice.1.cs [^] (2,092 bytes) 07-06-08 00:39

nicolas cellier   
07-10-08 10:07   
Since squeak-dev thread tend to show i was misunderstood, I add a few complements:
My aim is not to solve the halting problem! This is not possible.
I don't want to fight against maths, logic nor Godel.

I just want to be able to count loops so that I can provide a hint and decide to stop the test.

Monitoring resources consumption (CPU and memory) at an upper level would be of greater interest than this partial support...

See [^]