[Tutor] DATA TYPES
kent37 at tds.net
Thu Feb 21 13:06:11 CET 2008
Michael Langford wrote:
>> Not sure how you would do that with unit tests?
> You write unit tests for each of your functions that test their input
> and output. Presumably, if you used a float somewhere in the middle
> there, when you don't use the float in the java implementation, you'll
> get a different answer. If you don't get a different answer,
> presumably it didn't matter, or your tests don't provide good enough
> coverage of the number space.
OK, yes, unit tests would be very helpful in verifying the correctness
of the translation. As I noted separately, I think the compiler will
answer the original question.
More information about the Tutor