Imagine its a few years ago, and you're asked to write a program to disprove Fermat's Last Theorum. Within you code, you have a function: bool fermatIsWrong(x, y, n) { // return true if n > 2 and nth root of (x^n + y^n) is an integer // else return false } At the time you are writing this function, you do not know whether there exists a set of numbers, {x, y, n} which lead to a true result. (We now know that a valid implementation would be to simply "return false" because the theorum is true; but it is possible to find other examples for which the answer is currently unknown) Is it possible to write unit tests for such a function? --DaveWhipp. ---- Here's an attempt ... If the nth root of x^n + y^n is an integer, it is surely less than some easily-computed value like, say, x^n + y^n. (Better bound left to the reader.) Therefore if fermatIsWrong(x, y, n) answers true, this test checks and should return true also: sum := x^n + y^n; for ( i=1; i++; i