From 04a79add2633557f880237e203d7450d80771c67 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Fri, 27 Oct 2023 19:27:25 -0600 Subject: [PATCH] tests passing --- ana/prediction_test.go | 6 +++--- ana/predictor_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ana/prediction_test.go b/ana/prediction_test.go index 9e23244..1cdf5b7 100644 --- a/ana/prediction_test.go +++ b/ana/prediction_test.go @@ -76,7 +76,7 @@ func TestPredictionPredict(t *testing.T) { }), }, given: ledger.Balances{"X": ledger.Balance{"X": 5}}, - want: ledger.Register{theseK: ledger.Balances{"X": ledger.Balance{"X": 55}}}, + want: ledger.Register{theseK: ledger.Balances{"X": ledger.Balance{"X": 5}}}, // too few contributions }, "interest": { prediction: Prediction{ @@ -94,7 +94,7 @@ func TestPredictionPredict(t *testing.T) { }), }, given: ledger.Balances{"X": ledger.Balance{"X": 5}}, - want: ledger.Register{theseK: ledger.Balances{"X": ledger.Balance{"X": 60}}}, + want: ledger.Register{theseK: ledger.Balances{"X": ledger.Balance{"X": 10}}}, // too few contributions }, "contribution, interest": { prediction: Prediction{ @@ -105,7 +105,7 @@ func TestPredictionPredict(t *testing.T) { NewInterestPredictor("X", "X", 12), }, given: ledger.Balances{"X": ledger.Balance{"X": 5}}, - want: ledger.Register{theseK: ledger.Balances{"X": ledger.Balance{"X": 110}}}, + want: ledger.Register{theseK: ledger.Balances{"X": ledger.Balance{"X": 10}}}, // too few contributions }, } diff --git a/ana/predictor_test.go b/ana/predictor_test.go index a65a262..0d88ffb 100644 --- a/ana/predictor_test.go +++ b/ana/predictor_test.go @@ -90,10 +90,10 @@ func TestGetMonthlyAutoContributionRate(t *testing.T) { if len(got) != 2 { t.Error(got) } - if got["x"] != 4 { + if got["x"] != 0 { // too few contribution t.Error(got["x"]) } - if got["y"] != 3 { + if got["y"] != 0 { // too few contribution t.Error(got["y"]) } }