reduce howeyc
This commit is contained in:
@@ -3,9 +3,6 @@ package ledger
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/howeyc/ledger"
|
||||
"github.com/howeyc/ledger/decimal"
|
||||
)
|
||||
|
||||
func TestDelta(t *testing.T) {
|
||||
@@ -13,11 +10,7 @@ func TestDelta(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
delta := newDelta(d, ledger.Account{
|
||||
Name: "name",
|
||||
Balance: decimal.NewFromFloat(34.56),
|
||||
Comment: "comment",
|
||||
})
|
||||
delta := newDelta(d, "name", 34.56)
|
||||
|
||||
if delta.Date != d {
|
||||
t.Error(delta.Date)
|
||||
@@ -34,11 +27,7 @@ func TestDelta(t *testing.T) {
|
||||
t.Log(delta)
|
||||
|
||||
d2, _ := time.Parse("2006-01-02", "2099-09-08")
|
||||
delta2 := newDelta(d2, ledger.Account{
|
||||
Name: "name",
|
||||
Balance: decimal.NewFromFloat(11.11),
|
||||
Comment: "comment",
|
||||
})
|
||||
delta2 := newDelta(d2, "name", 11.11)
|
||||
|
||||
combined := delta.Plus(delta2)
|
||||
if combined.Date != d2 {
|
||||
|
||||
Reference in New Issue
Block a user