Skip to content

Instantly share code, notes, and snippets.

@andypols
Created March 9, 2021 19:05
Show Gist options
  • Save andypols/fd2073ca63cb57018207a77ea1757718 to your computer and use it in GitHub Desktop.
Save andypols/fd2073ca63cb57018207a77ea1757718 to your computer and use it in GitHub Desktop.
import junit.framework.TestCase;
import java.text.DecimalFormat;
import java.text.ParseException;
public class StrangeNumberTest extends TestCase {
public void testWierdJavaNumber() throws ParseException {
DecimalFormat format = new DecimalFormat("##,###.00");
assertEquals("Amazing, but true",
10,
(Long) format.parse("10WTF?"), 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment