Additional Unit Tests

int

int

int

int, got it working!

int
This commit is contained in:
rigelrozanski
2017-04-13 23:31:52 -04:00
committed by Rigel Rozanski
parent 221421ad3e
commit 4bf37baf0b
5 changed files with 350 additions and 3 deletions
+8
View File
@@ -19,6 +19,14 @@ func (coin Coin) String() string {
type Coins []Coin
func (coins Coins) String() string {
out := ""
for _, coin := range coins {
out += fmt.Sprintf("(%v %v) ", coin.Denom, coin.Amount)
}
return out
}
// Must be sorted, and not have 0 amounts
func (coins Coins) IsValid() bool {
switch len(coins) {