Add more test cases
Fix a bug when fractionalPart is the empty string