fixed unit tests with proper floating-point comparison