mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-27 09:15:15 +00:00
dd087b287d
Signed-off-by: c9s <yoanlin93@gmail.com>
22 lines
363 B
Go
22 lines
363 B
Go
package optimizer
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func Test_jsonToYamlConfig(t *testing.T) {
|
|
err := os.Mkdir(".tmpconfig", 0755)
|
|
assert.NoError(t, err)
|
|
|
|
tf, err := jsonToYamlConfig(".tmpconfig", []byte(`{
|
|
}`))
|
|
assert.NoError(t, err)
|
|
assert.NotNil(t, tf)
|
|
assert.NotEmpty(t, tf.Name())
|
|
|
|
_ = os.RemoveAll(".tmpconfig")
|
|
}
|