|
|
@@ -1,7 +1,6 @@
|
|
|
package arbitrage
|
|
|
|
|
|
import (
|
|
|
- "fmt"
|
|
|
"github.com/shopspring/decimal"
|
|
|
"math/big"
|
|
|
"testing"
|
|
|
@@ -45,8 +44,15 @@ func TestSimulationLevel2Path(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
SimulationLevel2Path(&path2)
|
|
|
+ t.Logf("%+v\n", path2.Sim.ToJsonString())
|
|
|
|
|
|
- HistoryInfo(fmt.Sprintf("%+v", path2.Sim.ToJsonString()))
|
|
|
+ // path数组装填测试
|
|
|
+ path2Copy := path2
|
|
|
+ pathList := []Path{path2, path2Copy}
|
|
|
+ PutSimulationToPathList(pathList)
|
|
|
+ for _, path := range pathList {
|
|
|
+ t.Logf("level=%+v, Sim=%+v, LoanLp=%+v", path.Level, path.Sim.ToJsonString(), path.LoanLp)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func TestSimulationLevel3Path(t *testing.T) {
|
|
|
@@ -102,5 +108,5 @@ func TestSimulationLevel3Path(t *testing.T) {
|
|
|
|
|
|
SimulationLevel3Path(&path3)
|
|
|
|
|
|
- HistoryInfo(fmt.Sprintf("%+v", path3.Sim.ToJsonString()))
|
|
|
+ t.Logf("%+v\n", path3.Sim.ToJsonString())
|
|
|
}
|