To fake big endian to test IsBigEndian() is tricky, as we have implemented it like:
IsBigEndian() {
int i=1;
return ((char)i) == 0;
}

to fake big endian, we need some mechanism to change the value of i, or change the return statement.
If the big endian is wrong, this test will fail on a big endian machine...

The similar to MPhton64, I have embeded IsBigEndian() into the function, so it seems we could only test half the case. Do you have better idea?