Unit test for floating point comparison method