From: John Roth Date: 2001-12-20T07:28:25+09:00 Subject: [ruby-talk:29023] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) "Bob Binder" wrote in message news:ded6b237.0112120554.40aa35a9@posting.google.com... > "Kent Beck" wrote in message news:<9v4dab$m80 > [snip] > > Use a sensible language where integers act like integers, not like 32-bit > > counter with rollover. If you want to write a Java version of the function, > > and show what happens with 2^31, feel free to write those test cases. > > > Surely there's a limit at some size -- could you report to us how many > milli-seconds and the value of i at which your Smalltalk of choice > complains if you do something like > > int i,j; > j=2; > maxInt=0x7FFFFFFF; > for(i=1;i > Please excuse my use of this barbaric tongue to state the > requirements, but I was never able to abide the mental contortion that > Smalltalk syntax imposed on my feeble brain. And please feel free to > run up maxInt to infinity and beyond, if my guess doesn't do the job. > > When you've found out what the limit L is in your environment, then > add 3 tests: {L,L,L},(L-1,L,L}, {L,L-1,L-2}. All are valid triangles > in the bounds of your representation, and should therefore be > correctly classified. This behavior is also common to Lisp, Python (2.2 and beyond) and many, many other languages. What you suggest is not possible, because the limit is totally dependent on the machine you are running on, the implementation, and similar things. _________________________________________________________________ > Bob Binder http://www.rbsc.com RBSC Corporation > rbinder@ r b s c.com Advanced Test Automation 3 First National Plz > 312 214-3280 tel Process Improvement Suite 1400 > 312 214-3110 fax Test Outsourcing Chicago, IL 60602 John Roth