Skip to content

Commit

Permalink
✅ test: update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyuexing committed Jan 2, 2024
1 parent 9dd93bf commit f87bb7b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestFormat(t *testing.T) {
"b":2,
},"?")
if result2 != "1 2" {
t.Error("not pass")
t.Error(fmt.Sprintf("Expect %s, but got %s","1 2",result2))
}

result3 := utils.Template("/a /b",map[string]any{
Expand All @@ -32,7 +32,7 @@ func TestFormat(t *testing.T) {
},"/")

if result3 != "hello world" {
t.Error("not pass")
t.Error(fmt.Sprintf("Expect %s, but got %s","hello world",result3))
}

result4 := utils.Template("【a】 【b】",map[string]any{
Expand All @@ -41,7 +41,7 @@ func TestFormat(t *testing.T) {
},"【】")

if result4 != "hello world" {
t.Error("not pass")
t.Error(fmt.Sprintf("Expect %s, but got %s","hello world",result4))
}

result5 := utils.Template("《a》 《b》",map[string]any{
Expand All @@ -50,7 +50,7 @@ func TestFormat(t *testing.T) {
},"《》")

if result5 != "hello world" {
t.Error("not pass")
t.Error(fmt.Sprintf("Expect %s, but got %s","hello world",result5))
}

result6 := utils.Template("!a! !b!",map[string]any{
Expand All @@ -59,7 +59,7 @@ func TestFormat(t *testing.T) {
},"!!")

if result6 != "hello world" {
t.Error("not pass")
t.Error(fmt.Sprintf("Expect %s, but got %s","hello world",result6))
}

result7 := utils.Template("👉a👈 👉b👈",map[string]any{
Expand All @@ -68,7 +68,7 @@ func TestFormat(t *testing.T) {
},"👉👈")

if result7 != "hello world" {
t.Error("not pass")
t.Error(fmt.Sprintf("Expect %s, but got %s","hello world",result7))
}

result8 := utils.Template("[a] [b]",map[string]any{
Expand All @@ -77,7 +77,7 @@ func TestFormat(t *testing.T) {
},"[]")

if result8 != "hello world" {
t.Error("not pass")
t.Error(fmt.Sprintf("Expect %s, but got %s","hello world",result8))
}
}

Expand Down

0 comments on commit f87bb7b

Please sign in to comment.