Files
LeetCode-Go/leetcode/0205.Isomorphic-Strings/205. Isomorphic Strings_test.go
2020-08-27 00:58:22 +08:00

59 lines
799 B
Go

package leetcode
import (
"fmt"
"testing"
)
type question205 struct {
para205
ans205
}
// para 是参数
// one 代表第一个参数
type para205 struct {
one string
two string
}
// ans 是答案
// one 代表第一个答案
type ans205 struct {
one bool
}
func Test_Problem205(t *testing.T) {
qs := []question205{
{
para205{"egg", "add"},
ans205{true},
},
{
para205{"foo", "bar"},
ans205{false},
},
{
para205{"paper", "title"},
ans205{true},
},
{
para205{"", ""},
ans205{true},
},
}
fmt.Printf("------------------------Leetcode Problem 205------------------------\n")
for _, q := range qs {
_, p := q.ans205, q.para205
fmt.Printf("【input】:%v 【output】:%v\n", p, isIsomorphic(p.one, p.two))
}
fmt.Printf("\n\n\n")
}