¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: [TDD] How do you write tests if you aren't sure what the result should be?


 

Ill write more later when I'm at my desk, but the use case here is matching
and predicting animations

On Feb 14, 2013 5:15 PM, "Steven Gordon" <sgordonphd@...> wrote:

Even when the math is complicated, there should be inputs where the results
are easy to hand compute. For example, where the inputs are combinations
of 0s, 1s, -1s, etc. Those trivial cases should be enough to drive
development of properly structured code.

I would depend on customer-level tests to see if the computations are
properly supporting whatever "business" functionality the system is
supposed to deliver. If wrong answers still allows the user to do what
they need to do, then maybe the fancy formulas are overkill anyway.

SteveG

On Thu, Feb 14, 2013 at 12:24 AM, Avi Kessner <akessner@...> wrote:

**


Hi, I have a simple question.
I've been developing my program with TDD however I have hit a snag and
I'm
not sure how to continue.
We have some complicated mathematical formulas that interact with each
other The math is too complicated for me to resolve easily. These
formulas are calculated based on time. (For example, an elastic tween
formula)
I need to write a series of functions which predict what the steps of the
formula will be. (How many timer ticks will it take to get to point A?)

This is something that I feel can have tests, and needs tests. But I have
no idea what to check or how to know if the test is correct.

My actual question is a meta-question by the way. How do I write tests
when I don't know what the results should be, but I know the computer
needs
to get the "correct" result?

Thanks.

brought to you by the letters A, V, and I
and the number 47









------------------------------------

Yahoo! Groups Links



Join [email protected] to automatically receive all group messages.