fix test_format_data()
add casts for TEST_MEM_EQ()