You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
381 B

  1. package coordinator
  2. import (
  3. "math/big"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestAddPerc(t *testing.T) {
  8. assert.Equal(t, "110", addPerc(big.NewInt(100), 10).String())
  9. assert.Equal(t, "101", addPerc(big.NewInt(100), 1).String())
  10. assert.Equal(t, "12", addPerc(big.NewInt(10), 20).String())
  11. assert.Equal(t, "1500", addPerc(big.NewInt(1000), 50).String())
  12. }