impl NewBPIs(path)[currency].Get(date)
This commit is contained in:
@@ -157,5 +157,17 @@ P 2023-10-22 07:33:56 GME $17.18
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if got := got["USDC"].Lookup("2099-01-01"); got != 0 {
|
||||
t.Error("default got != 0:", got)
|
||||
}
|
||||
if got := got["GME"].Lookup("2099-01-01"); got != 17.18 {
|
||||
t.Errorf("shouldve returned latest but got %v", got)
|
||||
}
|
||||
if got := got["GME"].Lookup("2023-09-19"); got != 18.22 {
|
||||
t.Errorf("shouldve returned one day before but got %v", got)
|
||||
}
|
||||
if got := got["GME"].Lookup("2023-09-18"); got != 18.22 {
|
||||
t.Errorf("shouldve returned day of but got %v", got)
|
||||
}
|
||||
t.Log(got)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user