mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
* Adds formatting of pair within binance wrapper, adds return of error from cli.ShowCommmandHelp * Add formatting function to submit order wrapper functions * Remove superfluous functionality * Updated exchange wrapper issues to create a disruptive pair to see which exchanges require attention, updates currency code generation and matching * reinstated format check, fixed tests * fixed niterinos * fix test * fix spelling mistake * make html file more aesthetic * Add missing format pairs * add formatting to pair for BTC Markets func * fix spelling
31 lines
568 B
Go
31 lines
568 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/thrasher-corp/gocryptotrader/currency"
|
|
)
|
|
|
|
func TestDisruptFormatting(t *testing.T) {
|
|
_, err := disruptFormatting(currency.Pair{})
|
|
if err == nil {
|
|
t.Fatal("error cannot be nil")
|
|
}
|
|
|
|
_, err = disruptFormatting(currency.Pair{Base: currency.BTC})
|
|
if err == nil {
|
|
t.Fatal("error cannot be nil")
|
|
}
|
|
|
|
p := currency.NewPair(currency.BTC, currency.USDT)
|
|
|
|
badPair, err := disruptFormatting(p)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if badPair.String() != "BTC-TEST-DELIM-usdt" {
|
|
t.Fatal("incorrect disrupted pair")
|
|
}
|
|
}
|