Skip to content

Commit

Permalink
refactor: 优化单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Aug 13, 2024
1 parent b7d6d67 commit 8eaaf2b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ void testAdd() {

assertEquals(CalculateUtils.add(1, 1), 2L);
assertEquals(CalculateUtils.add(1F, 1F), 2F);
assertEquals(CalculateUtils.add(1, 1F), 2F);
assertEquals(CalculateUtils.add(1D, 1D), 2D);
assertEquals(CalculateUtils.add(1, 1D), 2D);
assertEquals(CalculateUtils.add(1F, 1D), 2D);
assertEquals(new BigDecimal(2), CalculateUtils.add(new BigDecimal("1"), 1L));

assertEquals(new BigDecimal(2), CalculateUtils.add(new BigDecimal("1"), new BigDecimal("1")));
assertEquals(new BigDecimal(2), CalculateUtils.add(new BigDecimal("1"), new BigInteger("1")));
Expand Down

0 comments on commit 8eaaf2b

Please sign in to comment.