"// check the position of our hero
toggle quoted message
Show quoted text
assert( penguin.position, whereEverYouWantItToBe );" Yes, that is exactly what I want to know :) I don't know where I want the penguin to end up. What I have done for now is to "cheat". I create a new scene where the penguin always ends up on the mark that I have displayed, and I use the current velocity to decide when to add this scene to the end of the animation. I don't like this solution for multiple reasons, one of those problems is that the penguin is now flying for slightly longer than it's supposed to. I came to the group seeing if there are "proper" ways to solving this sort of problem. The creation of multiple scenarios and test files sounds like it's the right direction, but I'm unclear on how that goal would work. It doesn't seem right to me that proper TDD would require that I cheat at my requirements :) "One thing that tells you this is going to be hard is the name of the test In this case, I keep getting names like this: - When_The_Penguin_Is_Hit_Hard_It_Bounces_Many_Times_And_ Lands_A_Long_Way_Away Hmmm! That is a very excellent point! quote cut short for brevity... " It will not TEACH you what the domain is. Sorry :-( Amir " All very good points. Part of the problem here is that I feel that it's not just laziness that causes me to not properly know the domain, (though that can certainly be part of it) but also, I think in essence the solution isn't knowable. Because of various speeds of computers, rendering time, inaccuracy of timers etc. This reminds me of the Theta notation for algorithms, and makes me wonder if you can write unit tests when the information is so inherently fuzzy. Surely it must be possible. brought to you by the letters A, V, and I and the number 47 On Fri, Feb 15, 2013 at 3:36 PM, sh <shvfn@...> wrote:
** |