add endian test code