From a718e30bb4af449a053ca3eb2ed663a46fbff6a9 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 4 Oct 2024 23:46:43 +0800 Subject: [PATCH] refactor tests --- pkg/bbgo/account_value_calc_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/bbgo/account_value_calc_test.go b/pkg/bbgo/account_value_calc_test.go index 6036f18b3..f709ee9ad 100644 --- a/pkg/bbgo/account_value_calc_test.go +++ b/pkg/bbgo/account_value_calc_test.go @@ -187,13 +187,13 @@ func Test_aggregateUsdValue(t *testing.T) { { name: "mixed", args: args{ - balances: types.BalanceMap{ - "USDC": types.Balance{Currency: "USDC", Available: Number(70.0 + 80.0)}, - "USDT": types.Balance{Currency: "USDT", Available: Number(100.0)}, - "BTC": types.Balance{Currency: "BTC", Available: Number(0.01)}, - }, + balances: BalancesFromText(` + USDC, 150.0 + USDT, 100.0 + BTC, 0.01 + `), }, - want: number(250.0), + want: Number(250.0), }, } for _, tt := range tests {