Reputation: 805
how can I write a test case to compare infinity value. Example 10/0.0 results infinity how can i write following for it
assertThat(<**what will be here?**>).isCloseTo(10/0.0);
Upvotes: 3
Views: 265
Reputation: 28279
How about
assertTrue(Double.isInfinite(10/0.0))
Upvotes: 5