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