mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-11 14:56:57 +08:00
chore: fix go formatting for test files (#931)
This commit is contained in:
committed by
GitHub
parent
076e8bc1c1
commit
f4c95c0aae
@@ -29,7 +29,7 @@ func TestPromptManager_LoadTemplates(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "加载多个模板文件",
|
name: "加载多个模板文件",
|
||||||
setupFiles: map[string]string{
|
setupFiles: map[string]string{
|
||||||
"default.txt": "默认策略",
|
"default.txt": "默认策略",
|
||||||
"conservative.txt": "保守策略",
|
"conservative.txt": "保守策略",
|
||||||
"aggressive.txt": "激进策略",
|
"aggressive.txt": "激进策略",
|
||||||
},
|
},
|
||||||
@@ -130,15 +130,15 @@ func TestPromptManager_GetTemplate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
templateName string
|
templateName string
|
||||||
expectError bool
|
expectError bool
|
||||||
expectedContent string
|
expectedContent string
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "获取存在的模板",
|
name: "获取存在的模板",
|
||||||
templateName: "default",
|
templateName: "default",
|
||||||
expectError: false,
|
expectError: false,
|
||||||
expectedContent: "默认策略内容",
|
expectedContent: "默认策略内容",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -225,7 +225,7 @@ func TestPromptManager_ReloadTemplates(t *testing.T) {
|
|||||||
func TestPromptManager_GetAllTemplateNames(t *testing.T) {
|
func TestPromptManager_GetAllTemplateNames(t *testing.T) {
|
||||||
pm := NewPromptManager()
|
pm := NewPromptManager()
|
||||||
pm.templates = map[string]*PromptTemplate{
|
pm.templates = map[string]*PromptTemplate{
|
||||||
"default": {Name: "default", Content: "默认策略"},
|
"default": {Name: "default", Content: "默认策略"},
|
||||||
"conservative": {Name: "conservative", Content: "保守策略"},
|
"conservative": {Name: "conservative", Content: "保守策略"},
|
||||||
"aggressive": {Name: "aggressive", Content: "激进策略"},
|
"aggressive": {Name: "aggressive", Content: "激进策略"},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ func TestGetSzDecimals_ValidMeta(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
coin string
|
coin string
|
||||||
expectedDecimals int
|
expectedDecimals int
|
||||||
}{
|
}{
|
||||||
{"BTC", 5},
|
{"BTC", 5},
|
||||||
|
|||||||
Reference in New Issue
Block a user