Files
LeetCode-Go/leetcode/0557.Reverse-Words-in-a-String-III/557. Reverse Words in a String III_test.go
2020-08-27 00:58:22 +08:00

48 lines
703 B
Go

package leetcode
import (
"fmt"
"testing"
)
type question557 struct {
para557
ans557
}
// para 是参数
// one 代表第一个参数
type para557 struct {
s string
}
// ans 是答案
// one 代表第一个答案
type ans557 struct {
one string
}
func Test_Problem557(t *testing.T) {
qs := []question557{
{
para557{"Let's take LeetCode contest"},
ans557{"s'teL ekat edoCteeL tsetnoc"},
},
{
para557{""},
ans557{""},
},
}
fmt.Printf("------------------------Leetcode Problem 557------------------------\n")
for _, q := range qs {
_, p := q.ans557, q.para557
fmt.Printf("【input】:%v 【output】:%v\n", p, reverseWords(p.s))
}
fmt.Printf("\n\n\n")
}