¿ªÔÆÌåÓý

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

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


 

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

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