Test cases seem to have some trouble with floats, for example, create a test case expecting a result of 0.4 for the following function:
float test() {
return 1.2 - 0.8;
}
You'll receive an error saying you got 0.400000 but expected 0.400000 which is a bit silly! Obviously at some level floating point can introduce error due to the way it is defined. However, I think it may be fair to insert an error correction based upon the length of the value provided. For example, if the return value is specified as 0.4, then a result of 0.400000 should be adequate.
Perhaps the result could be rounded to within 5 decimal places of the expected return value, so for example, 0.4 would cause the return value to round to within 6 decimal places (its own 1 decimal place + 5), as that's "near enough".
An alternative could be to allow us to insert a tilde into float values to indicate error correction. For example, in my case I might enter an expected return value of ~0.4 to say "anything close to 0.4".